|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #34544 shutdown_function is called with header already sent
Submitted: 2005-09-18 23:36 UTC Modified: 2005-09-27 01:00 UTC
Avg. Score:5.0 ± 0.0
Reproduced:0 of 0 (0.0%)
From: panard at inzenet dot org Assigned:
Status: No Feedback Package: *General Issues
PHP Version: 5.0.5 OS: Linux
Private report: No CVE-ID: None
View Add Comment Developer Edit
Anyone can comment on a bug. Have a simpler test case? Does it work for you on a different platform? Let us know!
Just going to say 'Me too!'? Don't clutter the database with that please — but make sure to vote on the bug!
Your email address:
Solve the problem:
37 - 24 = ?
Subscribe to this entry?

 [2005-09-18 23:36 UTC] panard at inzenet dot org
when the registered shutdown_function is called, headers 
are already sent and they only contain : 

Reproduce code:

function print_document() {
        if ( headers_sent() ) {
                var_dump( headers_list() );
        header( "Content-Type: text/xml" );
register_shutdown_function( 'print_document' );


Expected result:
No warning  

Actual result:
array(1) { [0]=> string(12) "X-Powered-By" }   
 Warning: Cannot modify header information - headers  
already sent by (output started  
at /home/panard/public_html/bugs/register_shutdown_function.php:5)  
in /home/panard/public_html/bugs/register_shutdown_function.php 
on line 7 


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-19 07:33 UTC]
Please try using this CVS snapshot:
For Windows:
 [2005-09-27 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Tue Apr 23 10:01:29 2024 UTC