Re: mac os x - not getting headers already sent error
| From: | Burhan Khalid | Date: | Mon, 07 Mar 2005 07:01:19 +0000 |
| Subject: | Re: mac os x - not getting headers already sent error | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-210141@lists.php.net to get a copy of this message | ||
Jonathan Haddad wrote:
I do all my development on mac os x. sometimes, to debut a script, i output the query to the page. quite often the page sends headers to go to another page. When i do this, i comment out the header() function and read the results. When i'm done i remove the comment Sometimes I've forgotten to take out the debugging output. Now, on my server here, the page redirects and loads fine. But in the live environment, it craps out and people are left staring at a blank page.This means that on the live server, error_reporting is at such a level that the Warning that is generated by php -- the "Cannot modify header information output started at ...." line isn't displayed, and since there is output to the client, the header() call fails, which is why you are left with a white screen. You can use output buffering to avoid such a problem; there is also the header_sent() function. HTH