Re: Output_Buffer problem

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

 



On Sun, November 13, 2005 4:39 pm, Todd Cary wrote:
> My client has switched to a shared server, so direct access to the
> php.ini is not availble.  Our calendar program expects to have
> output_buffering set to On ("1").
>
> Currently, I get the expected error of
>
> Warning: Cannot modify header information - headers already sent by
> (output started at
> /home/content/s/f/y/sfycadmin/html/php/calendar/private/ltw_config.php:375)
> in
> /home/content/s/f/y/sfycadmin/html/php/calendar/private/ltwdisplaymonth.php
> on line 283
>
> At the top of ltwdisplaymonth.php, I tried ini_set(output_buffering,
> "1"), but that does not appear to have an effect.
>
> Have I missed something?

I don't see why it wouldn't have worked, but perhaps try:

<?php ob_start();?>

at the tip-top of the page instead.

Your other option is to structure your code better so that the headers
are dealt with before any HTML output, which, honestly, is usually the
natural way things fall out if your code is well-structured...

"Warning: Cannot modify header information - headers already sent by
(output started at "

is, for me, a Red Flag, that the code is a mess and not well-structured.

YMMV

-- 
Like Music?
http://l-i-e.com/artists.htm

-- 
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