Re: Headers already sent
| From: | Larry Garfield | Date: | Fri, 11 Nov 2011 06:48:01 +0000 |
| Subject: | Re: Headers already sent | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-315636@lists.php.net to get a copy of this message | ||
Perhaps your server is configured to have output buffering enabled by default? Check php.ini / phpinfo().
--Larry Garfield
On 11/11/2011 12:12 AM, Kranthi Krishna wrote:
Hi all, I am missing something pretty obvious here. The PHP Manual says "Remember that header() must be called before any actual output is sent, either by normal HTML tags, blank lines in a file, or from PHP.". A simple test case shows otherwise I have the following code test <?php setcookie("TestCookie", 'test'); nothing more nothing less.. only this code in a file I get the output in the browser ("test") AND the cookie is set (verified by live HTTP headers). Any ides on why this is happening ? Linux localhost 2.6.40-4.fc15.i686 #1 SMP Fri Jul 29 18:54:39 UTC 2011 i686 Apache 2.0 Handler Zend Engine v2.3.0, Xdebug v2.1.2 PHP 5.3.6 Kranthi. http://goo.gl/e6t3