Forum
Blog Preview Post PHP Session Notice
Hi,
when viewing a draft blog post in preview mode we are experiencing a session error notice in the perch runtime.php. The error message we are getting is:
Warning: session_start(): Cannot send session cache limiter - headers already sent (output started at /home/elkingto/public_html/news/post.php:1) in /home/elkingto/public_html/news/admin/core/lib/PerchSession.class.php on line 9
We have no whitespace appearing before the php include in the post.php file.
Is there any whitespace in your
config.php
file?Nope, I can't see any.
Is your
post.php
file saved as UTF8 with no BOM?I'm not entirely sure how to check that out thoroughly. Using file -I returns that it is UTF-8, and I've re-saved using sublime-text as UTF8 to be sure and the notice is still there.
The simplest way is to re-save it with that encoding. It looks likely that it has a BOM.
That seems to have sorted the issue out. Re-saved with different encoding and the notice has gone. Thanks Drew.