You are here: Re: Common session_start() error.. « PHP Programming Language « IT news, forums, messages
Re: Common session_start() error..

Posted by IchBin on 11/06/06 05:02

Andy Hassall wrote:
> On Sun, 05 Nov 2006 23:17:19 -0500, IchBin <weconsul@ptd.net> wrote:
>
>> I am getting the error message below when ever I try to start my script
>> on two different servers. I am not getting any errors off of my PC. I
>> have looked around and found the answer a simple one. I can not stop the
>> error in my script. The session_start() is the first thing that happens
>> before any Headers are created. Any one have any suggestions. Include
>> the start of the code that uses the session var.
>>
>> Warning: session_start(): Cannot send session cookie - headers already
>> sent by (output started at
>> /home/www/ichbinquotations.awardspace.com/quotes/quotes.php:1) in
>> /home/www/ichbinquotations.awardspace.com/quotes/quotes.php on line 8
>>
>> Warning: session_start(): Cannot send session cache limiter - headers
>> already sent (output started at
>> /home/www/ichbinquotations.awardspace.com/quotes/quotes.php:1) in
>> /home/www/ichbinquotations.awardspace.com/quotes/quotes.php on line 8
>>
>> <?php
>
> Do you really have this indentation in the script before the <?php tag? If so,
> that's where the output is coming from - and that's also backed up by the error
> saying the output started on line 1.
>
> It's possible to mask these problems by turning on one of the variants of
> output_buffering, but it's best practice to eliminate the output before any
> headers are sent so it works with or without buffering. This may explain why
> you see it on one setup but not the other - you probably have buffering (or
> zlib output compression) turned on.
>

Thanks Andy that was the problem. Sorry, I am new to PHP and I do not
understand why those four spaces would give me a problem. The "output of
what" is coming from where? It looks like I do have zlib output
compression ala phpinfo().

--
Thanks in Advance... http://ichbin.9999mb.com
IchBin, Pocono Lake, Pa, USA http://weconsultants.phpnet.us
______________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)

 

Navigation:

[Reply to this 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

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