Re: PHP will NOT display this on my dev machine: Warning: session_start()...

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

 



On Thu, 2010-02-11 at 19:19 +0100, John Black wrote:

> I am running into a strange problem and I hope someone might have an
> idea why this is happening.
> 
> My installation of PHP will *NOT* display the warning message below on 
> my development machine where it should display it (sample code at the 
> bottom).
> Warning: session_start() [function.session-start]: Cannot send session
> cache limiter ....
> 
> After receiving a bug report from a customer I tested my code on a XAMPP
> setup and, sure enough, it displayed the warning message.
> But on my machine, I can't find a message in my php log, it is as if 
> this problem does not even exist (on my dev machine).
> 
> My dev setup is:
> OS: ARCH 64bit (about a month out of date)
> PHP Dev stuff:
>    Apache/2.2.14 (Unix) mod_ssl/2.2.14 OpenSSL/0.9.8k DAV/2 SVN/1.6.6
>    PHP/5.3.1 with Suhosin-Patch
>    xdebug-2.0.5-2-x86_64
> 
> php.ini
>    error_reporting = E_ALL | E_STRICT
>    display_errors = On
>    display_startup_errors = On
>    log_errors = On
>    html_errors = On
>    ....
> 
> phpinfo() confirms that these settings are in effect
> 	display_errors	On	On
> 	error_reporting	32767	32767
> 
> So does anybody have any clue as to what could be causing this problem 
> of not getting a warning message?
> 
> Here is sample code:
> <p>The warning should be below this line</p>
> <?PHP session_start(); ?>
> <p>The warning should be above this line</p>
> 
> Which should produce the message below between the lines:
> Warning: session_start() [function.session-start]: Cannot send session
> cache limiter - headers already sent ( output started at <file_name> on
> line 2 )
> 
> but on my machine all I get is this in html source of the output:
> <p>The warning should be below this line</p>
> <p>The warning should be above this line</p>
> 
> thx
> -- 
> John
> Staat heißt das kälteste aller kalten Ungeheuer.  Kalt lügt es auch; und
> diese Lüge kriecht aus seinem Munde: 'Ich, der Staat, bin das Volk.'
> [Friedrich Nietzsche]
> 
> 


Is your system setup with session autostart enabled? That would cause
PHP to ignore you manually starting them I believe, as they should have
already been started. I'm not 100% certain on this though.

Thanks,
Ash
http://www.ashleysheridan.co.uk



[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