php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #55084 Function registered by header_register_callback is called only once per process
Submitted: 2011-06-30 07:32 UTC Modified: 2011-07-06 16:39 UTC
From: vrana@php.net Assigned: bjori
Status: Closed Package: HTTP related
PHP Version: 5.4.0alpha1 OS: Windows
Private report: No CVE-ID:
 [2011-06-30 07:32 UTC] vrana@php.net
Description:
------------
I use Apache 2.2.19. Function registered by header_register_callback() is called only after the server restart.

Test script:
---------------
<?php
header_register_callback(function () {
    echo "OK";
});
?>


Expected result:
----------------
"OK" each time the script is run.

Actual result:
--------------
"OK" only for the first time, nothing in the next runs.

Patches

Add a Patch

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2011-07-06 15:39 UTC] bjori@php.net
-Status: Open +Status: Assigned
 [2011-07-06 16:38 UTC] bjori@php.net
Automatic comment from SVN on behalf of bjori
Revision: http://svn.php.net/viewvc/?view=revision&amp;revision=313026
Log: Fixed bug#55084 (Function registered by header_register_callback is
called only once per process). (Hannes)

also fixed an issue when header()s are sent from the callback function
 [2011-07-06 16:39 UTC] bjori@php.net
-Status: Open +Status: Closed -Assigned To: +Assigned To: bjori
 [2011-07-06 16:39 UTC] bjori@php.net
This bug has been fixed in SVN.

Snapshots of the sources are packaged every three hours; this change
will be in the next snapshot. You can grab the snapshot at
http://snaps.php.net/.
 
Thank you for the report, and for helping us make PHP better.


 
PHP Copyright © 2001-2014 The PHP Group
All rights reserved.
Last updated: Mon Apr 21 12:02:07 2014 UTC