ID:               36808
 Updated by:       [EMAIL PROTECTED]
 Reported By:      emchen at isc dot upenn dot edu
-Status:           Open
+Status:           Closed
 Bug Type:         Unknown/Other Function
 Operating System: Linux 2.6.9 / RHEL4
 PHP Version:      5.1.2
 New Comment:

This bug has been fixed in CVS.

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.




Previous Comments:
------------------------------------------------------------------------

[2006-03-20 23:29:34] emchen at isc dot upenn dot edu

Description:
------------
the bug is a bit difficult to explain, it revolves around an apache
child process handling multiple PHP requests that use openlog/syslog.

the behavior of the bug is described in bug #28722 and bug #35777,
namely garbage appearing as the process name / ident field in syslog.

the bug occurs when an apache child process handles a script that makes
an openlog called followed by a script that makes a syslog called
without openlog (separate requests).



Reproduce code:
---------------
to recreate bug:

1.) set Apache (forking) MaxClients 1
2.) call php script with: 
<?
syslog(LOG_WARNING,"testing");
?>
3.) call php script with:
<?
openlog("MYLOG",LOG_PID,LOG_LOCAL0);
syslog(LOG_WARNING,"this is a warning");
?>
4.) call php script with:
<?
phpinfo();
?>
4.) call php script with:
<?
syslog(LOG_WARNING,"testing");
?>

Expected result:
----------------
in the attached code; the calls to syslog in step 2,3 produce normal
output, output from step 4 should be garbage.

since the apache child process persists beyond the execution of the PHP
scripts, step 4 picks up the results of the openlog call in step 2. 
when sylog gets called the 3rd time the reference to "ident" is
garbage.

Actual result:
--------------
user.log: Mar 20 16:54:15 [host] httpd: testing
local0.log: Mar 20 16:56:41 [host] MYLOG[18679]: this is a warning
local0.log: Mar 20 16:58:57 [host] [garbage][18679]: testing


------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=36808&edit=1

Reply via email to