Joined: Jun 23, 2005 Posts: 582 Location: United States
Posted: Wed Apr 25, 2007 9:44 am Post subject: Cannot modify header information
Hi, not certain if this is a core issue or not. Have been receiving this message via 'root' error log since host did server upgrade last month.
Code:
[23-Apr-2007 21:54:27] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxx/public_html/header.php:32) in /home/xxxxxx/public_html/modules/Forums/includes/sessions.php on line 253
[23-Apr-2007 21:54:27] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxx/public_html/header.php:32) in /home/xxxxxx/public_html/modules/Forums/includes/sessions.php on line 254
[23-Apr-2007 21:54:27] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxx/public_html/header.php:32) in /home/xxxxxx/public_html/modules/Forums/includes/page_header.php on line 489
[23-Apr-2007 21:54:27] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxx/public_html/header.php:32) in /home/xxxxxx/public_html/modules/Forums/includes/page_header.php on line 491
[23-Apr-2007 21:54:27] PHP Warning: Cannot modify header information - headers already sent by (output started at /home/xxxxxx/public_html/header.php:32) in /home/xxxxxx/public_html/modules/Forums/includes/page_header.php on line 492
also other time happen again and in that case was a problem in the hosting account. The hosting providers where doing an update to php in the server where I had my site.
Enjoy. _________________ "In the computer business you’re either a one or a zero and I am determined never to be zero."
I know by experience that programmers some times use the longest and hardest solution to the problem when they can also use the easy and simple. Before checking the code to try duplicating your error tell me about this:
Both Charserv and Chris in similar situation ask for the following possible problems:
Quote:
1. Disable Gzip compression for the boards
Quote:
2. Create an .htaccess file with this code: PHP_FLAG output_buffering on
3. If in your mainfile you have something like this:
Quote:
$phpver = phpversion();
if ($phpver >= '4.0.4pl1' && strstr($HTTP_USER_AGENT,'compatible')) {
if (extension_loaded('zlib')) {
ob_end_clean();
ob_start('ob_gzhandler');
}
} else if ($phpver > '4.0') {
Replace it for this:
Quote:
$phpver = phpversion();
if (42 >= '4.0.4pl1')
{
ob_start('ob_gzhandler');
}else if (42 > '4.0') {
Let me know, _________________ "In the computer business you’re either a one or a zero and I am determined never to be zero."
Joined: Oct 26, 2005 Posts: 131 Location: Maryland
Posted: Thu Jul 05, 2007 5:29 am Post subject:
That usually happens when adding mods and an older mod will make a call to the header when it has already been asked for earlier in the process, you can simply blank one of the statement out and it will work fine. _________________ When you try and fail it hurts but when you try and quit you die.
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum