Reply to Re: ini_set() not working as expected

Your name:

Reply:


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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация