|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34181 Header call not possible in a shutdown function
Submitted: 2005-08-18 09:40 UTC Modified: 2005-08-18 09:58 UTC
Avg. Score:2.3 ± 0.9
Reproduced:0 of 1 (0.0%)
From: proclub at karinthy dot hu Assigned:
Status: Wont fix Package: Output Control
PHP Version: 4.4.0 OS: Windows 2000
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2005-08-18 09:40 UTC] proclub at karinthy dot hu
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:

 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


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-08-18 09:58 UTC]
This behaviour was changed in 5.1, but it won't be changed in 4.4 & 5.0 for BC reasons.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Sun Jul 14 15:01:28 2024 UTC