php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Doc Bug #16217 syslog functions and exit functions are buggy
Submitted: 2002-03-22 03:22 UTC Modified: 2003-01-18 17:53 UTC
Votes:1
Avg. Score:5.0 ± 0.0
Reproduced:1 of 1 (100.0%)
Same Version:0 (0.0%)
Same OS:1 (100.0%)
From: f dot labanvoye at cg70 dot fr Assigned:
Status: Closed Package: Documentation problem
PHP Version: 4.3.0pre1 OS: windows NT 4/ win2000 pro/server
Private report: No CVE-ID: None
 [2002-03-22 03:22 UTC] f dot labanvoye at cg70 dot fr
Hello, 

Apache crash on windows platform when i use syslog functions ( openlog, syslog, closelog) and exit().

the script is:
1: <?php
2: define_syslog_variables();
3: openlog("Test", LOG_PID | LOG_PERROR, LOG_LOCAL0);
4: syslog(LOG_WARNING,"Essai de log");
5: closelog();
6: exit();
7: ?>

if i comment line 5 and 6, it's works fine.
if i comment line 3, 4, 5 , apache crash after few reload or navigation between index page and this script.
if i comment line 6, apache crash in the same case as above...

config:
 w2k pro sp2 
 apache 1.3.22 ( start in commmand line or as service )
 php 4.1.1 + ldap + oci8 (8.1.7)

 win nt 4 sp 6
 apache 1.3.22
 php 4.1.0 + ldap + oci8 (8.1.6) 
 

thanks for your comment.

Patches

Pull Requests

Add a Pull Request

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2002-03-22 04:01 UTC] mfischer@php.net
Does this also happen if you only use the CGI version on command line and as less modules (i.e. no ldp/oci8/whatever) as possible?
 [2002-03-22 04:29 UTC] f dot labanvoye at cg70 dot fr
Crash appear with the php module, not with cgi version.
with module and without extensions, apache always crash...

So this bugs is related to apache module.
I don't test with php 4.1.2 and on linux, it seems to be ok.
 [2002-06-10 04:33 UTC] f dot labanvoye at cg70 dot fr
platform : apache 1.3.24 / php 4.2.1 / w2k SP2

I test on php 4.2.1 and there are some difference.

The exit function seem to not cause bug, but the closelog crash apache (drwatson is started...). This appear when i reload one or two times the script.
all works fine when i comment closelog. 

No problem on linux
 [2002-08-30 14:35 UTC] iliaa@php.net
I cannot replicate the crash.

However, there is a definate problem with the docs for openlog() functions. On win32 LOCAL_LOG0 through LOCAL_LOG7 are not avaliable. In fact the openlog line in the example returns a warning about the 3rd parameter being invalid.

The openlog facilities should be better documented, mentioning which are *nix specific, win32 specific and which are common.
 [2002-08-30 14:47 UTC] iliaa@php.net
Actually that's LOG_LOCAL0 through LOG_LOCAL7 that are not avaliable. I made a typo in my previous comment.
 [2002-09-20 03:39 UTC] f dot labanvoye at cg70 dot fr
i get the same crash with php 4.2.3.  without exit call at end of script.

Ok for the documentation error
 [2002-10-28 03:03 UTC] f dot labanvoye at cg70 dot fr
i rerun test with php 4.30pre1 and i see this version is more stable. apache doesn't crash, but i get popup message like this : instruction at 0x100d4ebd ..... memory could not written.

but the hexa value seems to change if i run apache in command line or like service, or sith a different version (like 2.0.43).
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Wed Aug 14 07:01:28 2024 UTC