Re: PHP gives session error on remote server, but not local test machine [SOLVED]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 8 Apr 2008, at 04:15, Dave M G wrote:
PHP list,

Solving my own issue:

It turns out that some PHP scripts had an extra carriage return character at the end of the file. Once I removed these, the problem went away.

Strange that it only happened on some servers, not others, but there it is.

1. Enable E_ALL error_reporting and turn on display_errors - that should have told you the session could not be started because headers had already been sent

2. Don't put ?> when it's the last thing in a file, it's not necessary by design for this very reason

The servers where it worked probably had an implicit buffer configured thus not caring about output before session_start().

-Stut

--
http://stut.net/

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux