php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #48993 Opening error_log causes segfault
Submitted: 2009-07-20 22:37 UTC Modified: 2009-07-21 13:30 UTC
From: rick at bluehost dot com Assigned:
Status: Closed Package: Reproducible crash
PHP Version: 5.2.10 OS: CentOS 5.3
Private report: No CVE-ID: None
Welcome back! If you're the original bug submitter, here's where you can edit the bug or add additional notes.
If you forgot your password, you can retrieve your password here.
Password:
Status:
Package:
Bug Type:
Summary:
From: rick at bluehost dot com
New email:
PHP Version: OS:

 

 [2009-07-20 22:37 UTC] rick at bluehost dot com
Description:
------------
With 5.2.10 I am receiving a segfault whenever the error_log file is opened.  If recompiled on the same server with php 5.2.9, it completes with an successful entry in the error_log.  If the facility is changed to syslog in 5.2.10, it completes successfully with an entry sent to syslog.

Reproduce code:
---------------
Any error causing entry in php.ini will trigger the segfault.  IE, "extension=bogus.so".  php -v will cause a segfault with that in the ini file.

Expected result:
----------------
An entry successfully appended to ./error_log stating the error.

Actual result:
--------------
strace of php -v with "extension=bogus.so" in ./php.ini

~~~~~~~
open("/usr/local/lib/php/extensions/no-debug-zts-20060613/bogus.so", O_RDONLY) = -1 ENOENT (No such file or directory)
lstat("/home1", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home1/bluehost", {st_mode=S_IFDIR|0710, st_size=4096, ...}) = 0
lstat("/home1/bluehost/public_html", {st_mode=S_IFDIR|0755, st_size=4096, ...}) = 0
lstat("/home1/bluehost/public_html/error_log", 0x7fff4cd2c760) = -1 ENOENT (No such file or directory)
open("/home1/bluehost/public_html/error_log", O_WRONLY|O_CREAT|O_APPEND, 0644) = 3
--- SIGSEGV (Segmentation fault) @ 0 (0) ---
+++ killed by SIGSEGV +++


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2009-07-21 13:30 UTC] jani@php.net
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.


 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Sat May 03 01:01:29 2025 UTC