ID: 23229 Updated by: [email protected] Reported By: cassano at monroe dot net -Status: Assigned +Status: Closed Bug Type: Feature/Change Request Operating System: Linux 2.4.18-27 PHP Version: 5.2.10 Assigned To: aharvey New Comment:
This bug has been fixed in SVN. 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: ------------------------------------------------------------------------ [2010-02-26 17:02:00] [email protected] Side note: I can't convince the bug tracker to let me deassign myself and mark this as open again. If someone with SVN karma could commit the patches in the previous comment, I'd rather appreciate that. :) ------------------------------------------------------------------------ [2010-02-26 17:00:32] [email protected] >From the point of view of the syslog() function (the original subject of this bug), PHP imposes no restrictions on the size of the syslog message. I've tested it with syslog-ng configured to accept large (>1k, which is beyond the spec limit) log messages, and it works fine. So that's fixed, presumably by the fix for bug #36689 -- any problems with direct calls to syslog() having truncated messages are being caused by the syslog daemon, not PHP. Over IRC, pickscrape confirmed that he/she is actually using error_log = syslog, not the syslog() function. That has a different code path. (Of course.) At present, there's a hard-coded 500 character limit (PHP_5_3 has it at line 571 of main/main.c, should anyone wish to gaze at it), which matched what used to be in syslog() before bug #36689 was fixed. Since syslog() hasn't had that limit in almost four years and nobody's complained about it breaking their syslogd, it should be safe to remove it here as well. The patches at the end of this post will do just that. With the patch applied, there's still another limit. Happily, this one's already configurable. Because this is going through the standard error handling machinery, the log_errors_max_len INI setting will then take effect. By default, this will limit the message to 1k. Therefore, anyone wanting to send really big error messages to syslog will want to bump that as well. So, the patches: PHP_5_2: http://adamharvey.name/patches/bug-23229-5.2.patch PHP_5_3: http://adamharvey.name/patches/bug-23229-5.3.patch Trunk: http://adamharvey.name/patches/bug-23229-trunk.patch ------------------------------------------------------------------------ [2010-02-26 16:04:39] [email protected] Looking into this; although my preliminary feeling is this isn't a restriction in PHP as such. ------------------------------------------------------------------------ [2010-02-26 13:57:15] mbtaylor at gmail dot com I have experienced this in all PHP versions > 5. It makes backtraces pointless and code quite frustrating to debug. ------------------------------------------------------------------------ [2010-02-26 13:34:37] pickscrape at gmail dot com Happens in PHP 5.2.10 too. This limit is short enough to make most backtraces completely useless. ------------------------------------------------------------------------ The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/23229 -- Edit this bug report at http://bugs.php.net/?id=23229&edit=1
