Re: $_session/$_cookie trouble

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

 



Igor

Thanks for the link.  It was suggested that I must put the session_start() 
before all code on the parent page.  I am no longer getting the error 
messages,so I am assuming I am making progress, however I have yet to be 
able to get the $_SESSION or $_COOKIE to produce results...such as the 
ability to echo them.

Thanks for your help.

Gary


"Igor Escobar" <titiolinkin@xxxxxxxxx> wrote in message 
news:1f5251d50904281208g35fcc98t696b51a4bfc74a03@xxxxxxxxxxxxxxxxx
> http://www.tech-recipes.com/rx/1489/solve-php-error-cannot-modify-header-information-headers-already-sent/
>
>
> Regards,
> Igor Escobar
> Systems Analyst & Interface Designer
>
> --
>
> Personal Blog
> ~ blog.igorescobar.com
> Online Portifolio
> ~ www.igorescobar.com
> Twitter
> ~ @igorescobar
>
>
>
>
>
> On Tue, Apr 28, 2009 at 3:59 PM, Ashley Sheridan
> <ash@xxxxxxxxxxxxxxxxxxxx>wrote:
>
>> On Tue, 2009-04-28 at 10:48 -0400, Gary wrote:
>> > I am trying to set a cookie and a session, but seem to be running into 
>> > a
>> > wall.
>> >
>> > I have tried different variations, and keep getting the same error
>> message
>> >
>> > If I have this
>> >
>> > <?php
>> >
>> > session_start();
>> >
>> > I get this:
>> > Warning: session_start() [function.session-start]: Cannot send session
>> > cookie - headers already sent by (output started at
>> > C:\xampp\htdocs\weiss\assessresult.inc.php:2) in
>> > C:\xampp\htdocs\weiss\assessresult.inc.php on line 4
>> >
>> > Warning: session_start() [function.session-start]: Cannot send session
>> cache
>> > limiter - headers already sent (output started at
>> > C:\xampp\htdocs\weiss\assessresult.inc.php:2) in
>> > C:\xampp\htdocs\weiss\assessresult.inc.php on line 4
>> >
>> > If I have this:
>> > session_start();
>> >
>> > setcookie('sale_cookie','$sale_value', time()-3600);
>> > setcookie('assess_cookie','$assess_value', time()-3600);
>> > I get this
>> >
>> >
>> > Warning: session_start() [function.session-start]: Cannot send session
>> > cookie - headers already sent by (output started at
>> > C:\xampp\htdocs\weiss\assessresult.inc.php:2) in
>> > C:\xampp\htdocs\weiss\assessresult.inc.php on line 4
>> >
>> > Warning: session_start() [function.session-start]: Cannot send session
>> cache
>> > limiter - headers already sent (output started at
>> > C:\xampp\htdocs\weiss\assessresult.inc.php:2) in
>> > C:\xampp\htdocs\weiss\assessresult.inc.php on line 4
>> >
>> > Warning: Cannot modify header information - headers already sent by
>> (output
>> > started at C:\xampp\htdocs\weiss\assessresult.inc.php:2) in
>> > C:\xampp\htdocs\weiss\assessresult.inc.php on line 6
>> >
>> > Warning: Cannot modify header information - headers already sent by
>> (output
>> > started at C:\xampp\htdocs\weiss\assessresult.inc.php:2) in
>> > C:\xampp\htdocs\weiss\assessresult.inc.php on line 7
>> >
>> > If I delete and start over, I stll get the "headers already sent"... I
>> have
>> > tried numerous other variations, but all with the same error.
>> >
>> > What am I missing here?
>> >
>> > Thanks
>> >
>> > Gary
>> >
>> >
>> >
>> I would have thought it was obvious, the file assessresult.inc.php is
>> being called before your session_start(). Have you put your code before
>> every include?
>>
>>
>> Ash
>> www.ashleysheridan.co.uk
>>
>>
>> --
>> PHP General Mailing List (http://www.php.net/)
>> To unsubscribe, visit: http://www.php.net/unsub.php
>>
>>
> 



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[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