note 97843 added to function.syslog

From: Date: Tue, 11 May 2010 20:57:16 +0000
Subject: note 97843 added to function.syslog
Groups: php.notes 
Request: Send a blank email to php-notes+get-169160@lists.php.net to get a copy of this message
A word of warning; if you use openlog() to ready syslog() and your Apache threads accept multiple requests, you *must* call closelog() if Apache's error log is configured to write to syslog. Failure to do so will cause Apache's error log to write to whatever facility/ident was used in openlog. Example, in httpd.conf you have: ErrorLog syslog:local7 and in php you do: <?php openlog("myprogram", 0, LOG_LOCAL0); syslog("My syslog message"); ?> From here on out, this Apache thread will write ErrorLog to local0 and under the process name "myprogram" and not httpd! Calling closelog() will fix this. ---- Server IP: 69.147.83.197 Probable Submitter: 216.52.121.66 ---- Manual Page -- http://www.php.net/manual/en/function.syslog.php Edit -- https://master.php.net/note/edit/97843 Del: integrated -- https://master.php.net/note/delete/97843/integrated Del: useless -- https://master.php.net/note/delete/97843/useless Del: bad code -- https://master.php.net/note/delete/97843/bad+code Del: spam -- https://master.php.net/note/delete/97843/spam Del: non-english -- https://master.php.net/note/delete/97843/non-english Del: in docs -- https://master.php.net/note/delete/97843/in+docs Del: other reasons-- https://master.php.net/note/delete/97843 Reject -- https://master.php.net/note/reject/97843 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#169160) next »