RE: [PHP] 'Cannot send Headers' Problem!!

From: Date: Fri, 27 Jun 2003 12:41:17 +0000
Subject: RE: [PHP] 'Cannot send Headers' Problem!!
Groups: php.general 
Request: Send a blank email to php-general+get-153103@lists.php.net to get a copy of this message
[snip] On the internet server, apart from the beginning tables & html, this is what I get .. <b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home/unbreaka/public_html/mjs/directory.php:3) in <b>/home/unbreaka/public_html/mjs/global.inc.php</b> on line <b>531</b><br /> <br /> <b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home/unbreaka/public_html/mjs/directory.php:3) in <b>/home/unbreaka/public_html/mjs/global.inc.php</b> on line <b>532</b><br /> <br /> <b>Warning</b>: Cannot modify header information - headers already sent by (output started at /home/unbreaka/public_html/mjs/directory.php:3) in <b>/home/unbreaka/public_html/mjs/global.inc.php</b> on line <b>533</b><br /> And the code just ends here abruptly. Not a word after this. [/snip] Make ob_start() your first line of PHP code, and ob_end_flush() as the last line of PHP code, place it on the server and test that. Your global.inc.php is outputting a header on line 3. It is sending something to the browser on line 3. What is line 3? If it is setting a cookie it is outputting a header! HTH! Jay

« previous php.general (#153103) next »