php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #6624 error_log() in registered shutdown function
Submitted: 2000-09-08 05:04 UTC Modified: 2001-04-28 15:34 UTC
From: s dot busch at billiton dot de Assigned:
Status: Closed Package: Scripting Engine problem
PHP Version: 4.0.2 OS: SunOS 5.7 (sparc)
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: s dot busch at billiton dot de
New email:
PHP Version: OS:

 

 [2000-09-08 05:04 UTC] s dot busch at billiton dot 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

Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2000-11-01 09:47 UTC] sniper@php.net
reclassified.
 [2001-03-29 11:48 UTC] sniper@php.net
Does this happen with PHP 4.0.4pl1?

--Jani

 [2001-04-28 15:34 UTC] derick@php.net
No feedback. If this problem persists with PHP 4.0.5 which
will be released next week, please reopen this report.

Derick
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Thu May 08 01:01:27 2025 UTC