[Wolves] OT php sessions prob after server change
David Goodwin
david at codepoets.co.uk
Wed Nov 13 14:46:45 UTC 2013
On 13 Nov 2013, at 14:25, Wayne Morris <waynelists at machx.co.uk> wrote:
> Hi,
> Moving my websites from the Good Ole Boy Adam Sweet, to the big nasty corporation UK2.
>
> Sessions were working fine, no longer work properly with eg:
>
> Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home/j9accomm/public_html/j9/updatetest.php:7) in/home/j9accomm/public_html/j9/updatetest.php on line 416
>
> Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home/j9accomm/public_html/j9/updatetest.php:7) in/home/j9accomm/public_html/j9/updatetest.php on line 416
>
> gooogled the hell out of it, can't find anything that fixes it - all thats changed is server - any ideas?
Your previous host had output buffering turned on. Your new host doesn’t.
You need to either put ‘ob_start()’ at the top of your scripts/pages, or find a way to change the php.ini settings (perhaps through a .htaccess rule like at http://stackoverflow.com/questions/4642097/php-htaccess-output-buffering )
OR remove whatever is outputting content BEFORE you call session_start(). This may be blank lines or echo statements or just inline HTML.
David.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.lug.org.uk/pipermail/wolves/attachments/20131113/bff56815/attachment.html>
More information about the Wolves
mailing list