From:             jjarven at softers dot net
Operating system: Linux 2.4.26
PHP version:      4.3.7
PHP Bug Type:     Unknown/Other Function
Bug description:  syslog() logs garbage

Description:
------------
Note; this might relate to Bug 17648, thus have been around for a while.
Hopefully bug will be finally fixed.

-------
Logging messages to system log with plain syslog() (i.e. without using
openlog() and define_syslog_variables())creates random garbage/text from
memory preceding the actual message.

Example:
A line in any php-file:

syslog(LOG_NOTICE,"insert text here");

/var/log/messages showed:
Jun 10 08:34:30 mail ='crc' VALUE=': insert text here

The preceding text varies, sometimes it is correct (=nothing), sometimes
it's longer.

The problem can be solved like this:
define_syslog_variables();
openlog('Info:',LOG_ODELAY,LOG_USER);
syslog(LOG_NOTICE,"insert text here")
->
Jun 10 08:36:12 mail Info: insert text here
----------
Server is Apache 1.3.31 and php compiled as module.


Reproduce code:
---------------
 


-- 
Edit bug report at http://bugs.php.net/?id=28722&edit=1
-- 
Try a CVS snapshot (php4):  http://bugs.php.net/fix.php?id=28722&r=trysnapshot4
Try a CVS snapshot (php5):  http://bugs.php.net/fix.php?id=28722&r=trysnapshot5
Fixed in CVS:               http://bugs.php.net/fix.php?id=28722&r=fixedcvs
Fixed in release:           http://bugs.php.net/fix.php?id=28722&r=alreadyfixed
Need backtrace:             http://bugs.php.net/fix.php?id=28722&r=needtrace
Need Reproduce Script:      http://bugs.php.net/fix.php?id=28722&r=needscript
Try newer version:          http://bugs.php.net/fix.php?id=28722&r=oldversion
Not developer issue:        http://bugs.php.net/fix.php?id=28722&r=support
Expected behavior:          http://bugs.php.net/fix.php?id=28722&r=notwrong
Not enough info:            http://bugs.php.net/fix.php?id=28722&r=notenoughinfo
Submitted twice:            http://bugs.php.net/fix.php?id=28722&r=submittedtwice
register_globals:           http://bugs.php.net/fix.php?id=28722&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=28722&r=php3
Daylight Savings:           http://bugs.php.net/fix.php?id=28722&r=dst
IIS Stability:              http://bugs.php.net/fix.php?id=28722&r=isapi
Install GNU Sed:            http://bugs.php.net/fix.php?id=28722&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=28722&r=float

Reply via email to