Posted by Paul Lautman on 06/08/06 07:12
yawnmoth wrote:
> When running the following code I get a warning:
>
> <?
> ini_set('session.use_cookies',0);
>>
> random text
> <?
> session_start();
>>
>
> The output / warning I'm getting is this:
>
> random text
> Warning: session_start(): Cannot send session cache limiter - headers
> already sent (output started at /path/to/file.php:5) in
> /path/to/file.php on line 6
>
> Shouldn't the fact that I'm setting session.use_cookies to 0, via
> ini_set, prevent this error from taking place?
The headers are sent as soon as some output is sent. In your case you are
sending a blank followed by the text random text, before doing the
session_start().
[Back to original message]
|