php.net |  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
Votes:1
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
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: panard at inzenet dot org
New email:
PHP Version: OS:

 

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

Reproduce code:
---------------
<?php

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 

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2005-09-19 07:33 UTC] derick@php.net
Please try using this CVS snapshot:

  http://snaps.php.net/php5-STABLE-latest.tar.gz
 
For Windows:
 
  http://snaps.php.net/win32/php5.0-win32-latest.zip
 [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: Sun Dec 22 11:01:30 2024 UTC