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

From: Date: Tue, 08 Apr 2008 18:44:09 +0000
Subject: Re: PHP gives session error on remote server, but not local test machine [SOLVED]
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-272744@lists.php.net to get a copy of this message
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/

« previous php.general (#272744) next »