|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #36013 Segmentation fault
Submitted: 2006-01-14 20:52 UTC Modified: 2006-01-23 01:00 UTC
Avg. Score:4.1 ± 0.8
Reproduced:8 of 8 (100.0%)
Same Version:1 (12.5%)
Same OS:3 (37.5%)
From: xenon54 at generationphp dot net Assigned:
Status: No Feedback Package: Session related
PHP Version: 5.1.1 OS: Centos 4.2
Private report: No CVE-ID: None
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
Block user comment
Status: Assign to:
Bug Type:
From: xenon54 at generationphp dot net
New email:
PHP Version: OS:


 [2006-01-14 20:52 UTC] xenon54 at generationphp dot net
I'm receiving a Segmentation Fault when accessing index.php from cacti. I recompiled PHP without sessions support and the segmentation fault was not happening anymore.


Thanks for any help

Reproduce code:
I tried to locate the source of the segmentation fault.
I located the line by using exit; to see where the fault is caused.
To me, it makes no sense but giving it to you anyway. 


if (isset($_SESSION["sess_config_array"])) {
    $config_array = $_SESSION["sess_config_array"];

Expected result:
Segmentation fault

Actual result:

#0  0x00345d30 in vfprintf () from /lib/tls/
#1  0x0036114b in vsprintf () from /lib/tls/
#2  0x0034e4cb in sprintf () from /lib/tls/
#3  0x0137cdfa in _convert_to_string (op=0xbf4006a0,
    __zend_filename=0x15cfcf0 "/usr/src/php-5.1.1/Zend/zend_vm_execute.h",
    __zend_lineno=4607) at /usr/src/php-5.1.1/Zend/zend_operators.c:544
#4  0x013b7ffd in ZEND_END_SILENCE_SPEC_TMP_HANDLER (execute_data=0xbf400cc0)
    at /usr/src/php-5.1.1/Zend/zend_vm_execute.h:4607

#3  0x0137cdfa in _convert_to_string (op=0xbf4006a0,
    __zend_filename=0x15cfcf0 "/usr/src/php-5.1.1/Zend/zend_vm_execute.h",
    __zend_lineno=4607) at /usr/src/php-5.1.1/Zend/zend_operators.c:544
544                             op->value.str.len = zend_sprintf(op->value.str.val, "%ld", lval);  /* SAFE */

#4  0x013b7ffd in ZEND_END_SILENCE_SPEC_TMP_HANDLER (execute_data=0xbf400cc0)
    at /usr/src/php-5.1.1/Zend/zend_vm_execute.h:4607
4607                    convert_to_string(&restored_error_reporting);

error_log from Apache
[Sat Jan 14 09:28:35 2006] [notice] child pid 2125 exit signal Segmentation fault (11)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2006-01-14 20:58 UTC] xenon54 at generationphp dot net
It was initially on PHP5.1.1.
But the problem persists on PHP5.1.2
 [2006-01-14 22:48 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a short but complete example script to be able to reproduce
this bug ourselves. 

A proper reproducing script starts with <?php and ends with ?>,
is max. 10-20 lines long and does not require any external 
resources such as databases, etc.

If possible, make the script source available online and provide
an URL to it here. Try to avoid embedding huge scripts into the report.

 [2006-01-15 00:38 UTC] xenon54 at generationphp dot net
Fixed without any reasons.
But still cause segmentation fault with cli.

Will come back if I can reproduce this bug.
 [2006-01-23 01:00 UTC] php-bugs at lists dot php dot net
No feedback was provided for this bug for over a week, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
 [2006-03-12 17:40 UTC] alexdg at gmail dot com
I think I know what the issue is, bad user/passwd login configuration for the cacti mysql account in include/config.php. When running thru Apache the error_log will only output "segmentation fault" but if you run the poller.php script on its own, you'll get the typical error msg of a failed mysql login (some 10 times?), until it crashs.
 [2008-09-06 13:15 UTC] test at example dot com
I find it quite funny that this problem in connecting to MySQL leads to a segmentation fault. I can reproduce any it by installing OpenSuSE 10.x or OpenSuSE 11 and the 'cacti' package, and this has not changed for at least a couple years.
 [2008-12-10 08:06 UTC] fb at smartterra dot de
Same here:

- CentOS 5
- PHP 5.1.6
- mysql  Ver 14.12 Distrib 5.0.45

Browsing to any cacti webpage results in a white page.
# tail /var/log/httpd/error_log 

[Tue Dec 09 18:00:41 2008] [notice] child pid 24763 exit signal Segmentation fault (11)
 [2008-12-10 08:14 UTC] fb at smartterra dot de
Hm, strange. Same behavior with PHP 5.2.6 :-(
 [2009-08-16 10:38 UTC] jef at superior dot nl
Same problem on 5.2.10 and 5.3.0 :/ plz resolve this issue
 [2009-11-11 04:53 UTC] no at thanks dot com
When I ran into this issue, it turned out I didn't actually import the 
cacti.sql into mysql.  After doing that, no more "Segmentation fault".
Hope that helps someone.
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Fri Jun 14 19:01:30 2024 UTC