PHP 4.0 Bug #6624 Updated: error_log() in registered shutdown function
| From: | sniper@php.net | Date: | Thu, 29 Mar 2001 16:48:28 +0000 |
| Subject: | PHP 4.0 Bug #6624 Updated: error_log() in registered shutdown function | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-50273@lists.php.net to get a copy of this message | ||
ID: 6624
Updated by: sniper
Reported By: s.busch@billiton.de
Old-Status: Open
Status: Feedback
Old-Bug Type: *General Issues
Bug Type: Scripting Engine problem
Assigned To:
Comments:
Does this happen with PHP 4.0.4pl1?
--Jani
Previous Comments:
---------------------------------------------------------------------------
[2000-11-01 09:47:22] sniper@php.net
reclassified.
---------------------------------------------------------------------------
[2000-09-08 05:04:11] s.busch@billiton.de
(minor flaw, don't know if it's important, but maybe worth a check)
I registered a shutdown function via register_shutdown_function(). For debugging purposes and
because echo() isn't functional in the shutdown function, I used error_log('my log
message',0), so that the "error"-messages showed up in apache/logs/error_log.
The error_log()-call in "normal code" produced an entry in apache error_log with timestamp
and error type, and the error_log()-call in my shutdown callback function appeared without timestamp
and error type (see snippet below)
----
example PHP-code
function myshutdown () {
error_log('myshutdown() executed',0);
}
register_shutdown_function('myshutdown');
error_log('myshutdown-function registered',0);
----
Apache logs/error_log snippet
[Fri Sep 8 11:43:43 2000] [notice] Apache/1.3.12 (Unix) PHP/4.0.2 configured -- resuming normal
operations
[Fri Sep 8 11:43:52 2000] [error] myshutdown-function registered
myshutdown() executed
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=6624&edit=2