You are here: Re: [PHP] Output_Buffer problem « PHP « IT news, forums, messages
Re: [PHP] Output_Buffer problem

Posted by "Richard Lynch" on 11/14/05 20:39

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

 

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

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