output buffer
am 29.12.2009 22:09:40 von Marc Fromm
--_000_B0D7C0A3F35FE144A70312D086CBCA9B03D0F094CCExchMailbox 2u_
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
I am receiving the "Cannot send session cookie - headers already sent" mess=
age even though I am using ob_start() at the top of my script.
The php.ini file has output_buffering set to 4096 4096.
My server is running Red Hat Enterprise Linux 5.2
I am using PHP 5.1.6
Is there some other setting I need to adjust to be able to start a session =
within the php script?
Thanks
Marc
--_000_B0D7C0A3F35FE144A70312D086CBCA9B03D0F094CCExchMailbox 2u_--
Re: output buffer
am 29.12.2009 22:38:28 von Phpster
On Tue, Dec 29, 2009 at 4:09 PM, Marc Fromm wrote:
> I am receiving the "Cannot send session cookie - headers already sent" message even though I am using ob_start() at the top of my script.
> The php.ini file has output_buffering set to 4096 4096.
> My server is running Red Hat Enterprise Linux 5.2
> I am using PHP 5.1.6
>
> Is there some other setting I need to adjust to be able to start a session within the php script?
>
> Thanks
>
> Marc
>
>
Check that you don't have white space in your include files. One trick
there is to remove the closing PHP tags '?>' to avoid this problem
--
Bastien
Cat, the other other white meat
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: output buffer
am 30.12.2009 01:08:23 von Marc Fromm
I figured it out but not sure why.
On the dev server the script ran with no errors
On the live server the script created the header already sent error.
In the code I did not execute ob_start() at the top of the script.
Once I executed ob_start at the top of the script on the live server it wor=
ked with no header already sent error.
I cannot see why on the dev server it works with the ob_start() command in =
inside the script while the live server had an error when it was in the sam=
e place in the script.
-----Original Message-----
From: Alexey Bovanenko [mailto:a.bovanenko@gmail.com]=20
Sent: Tuesday, December 29, 2009 1:38 PM
To: Marc Fromm
Subject: Re: [PHP] output buffer
Hi.
There're some other code that is sent to client. You must send cookie
first, at header, then the other data.
Please send code to view your case.
With regards,
Alexey
On Wed, Dec 30, 2009 at 12:09 AM, Marc Fromm wrote:
> I am receiving the "Cannot send session cookie - headers already sent" me=
ssage even though I am using ob_start() at the top of my script.
> The php.ini file has output_buffering set to 4096 4096.
> My server is running Red Hat Enterprise Linux 5.2
> I am using PHP 5.1.6
>
> Is there some other setting I need to adjust to be able to start a sessio=
n within the php script?
>
> Thanks
>
> Marc
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: output buffer
am 30.12.2009 04:40:20 von kranthi
most probable error in your case is the dev server has output
buffering enabled while it is turned off on the live server. try
phpinfo to verify
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php