#34181 [Opn->WFx]: Header call not possible in a shutdown function
| From: | tony2001@php.net | Date: | Thu, 18 Aug 2005 07:58:52 +0000 |
| Subject: | #34181 [Opn->WFx]: Header call not possible in a shutdown function | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-83747@lists.php.net to get a copy of this message | ||
ID: 34181
Updated by: tony2001@php.net
Reported By: proclub at karinthy dot hu
-Status: Open
+Status: Wont fix
Bug Type: Output Control
Operating System: Windows 2000
PHP Version: 4.4.0
New Comment:
This behaviour was changed in 5.1, but it won't be changed in 4.4 & 5.0
for BC reasons.
Previous Comments:
------------------------------------------------------------------------
[2005-08-18 09:40:01] proclub at karinthy dot hu
Description:
------------
When calling the header() function in a function registred with
register_shutdown_function(), PHP issues a warning as it there had been
an output before.
Reproduce code:
---------------
<?php
register_shutdown_function('destructor');
function destructor()
{
header("HTTP/1.1 200 OK");
}
?>
Expected result:
----------------
The header correctly inserted in the output.
Actual result:
--------------
Warning: Cannot modify header information - headers already sent in
g:\[...]\bugtest.php on line 6
------------------------------------------------------------------------
--
Edit this bug report at http://bugs.php.net/?id=34181&edit=1