|  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #56382 Segfault Apache thread
Submitted: 2005-04-24 19:13 UTC Modified: 2005-04-29 11:59 UTC
From: destiney at gmail dot com Assigned:
Status: Not a bug Package: PDO (PECL)
PHP Version: 5.0.3 OS: Linux saturn 2.6.11-gentoo-r6
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: destiney at gmail dot com
New email:
PHP Version: OS:


 [2005-04-24 19:13 UTC] destiney at gmail dot com
I built PDO per docs:

I placed an entry in php.ini:

Viewed phpinfo() output.  Noticed no entry for PDO.

Made a PHP script using dl() to force the PDO entension to load.  Apache logs indicate segfaulting:
[Sun Apr 24 17:29:11 2005] [notice] child pid 754 exit signal Segmentation fault (11)

I am using Apache2 in prefork mode.

Reproduce code:

if( dl('') )
    echo ' extension loaded';
    echo ' extension failed to load';


Expected result:
I expected to see ' extension loaded' on the screen.  Instead I see nothing.

Actual result:
[Sun Apr 24 18:13:05 2005] [notice] child pid 1425 exit signal Segmentation fault (11)


Add a Patch

Pull Requests

Add a Pull Request


AllCommentsChangesGit/SVN commitsRelated reports
 [2005-04-24 22:59 UTC]
Thank you for this bug report. To properly diagnose the problem, we
need a backtrace to see what is happening behind the scenes. To
find out how to generate a backtrace, please read

Once you have generated a backtrace, please submit it to this bug
report and change the status back to "Open". Thank you for helping
us make PECL better.

also note that you should use:

in the php.ini file, and not the full path.
 [2005-04-27 10:21 UTC] destiney at gmail dot com
I changed the full path in php.ini to just the extension name.  That didn't make a difference.

I'm trying to generate a backtrace but am having issues.  I have recompiled both my Apache and PHP and added debugging.  Here's how I am trying:

> gdb apache2.prefork       
GNU gdb 6.3
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...(no debugging symbols found)
Using host libthread_db library "/lib/".

(gdb) set args -f /etc/apache2/httpd.conf 
(gdb) run
Starting program: /usr/sbin/apache2.prefork -f /etc/apache2/httpd.conf
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread 16384 (LWP 7693)]

Program exited normally.
(gdb) bt
No stack.

What do I need to do to get the backtrace?  Or can you tell me what I'm doing wrong?
 [2005-04-28 15:55 UTC] destiney at gmail dot com
I rebuilt PDO and enabled debugging.  It's acting a bit different now with debugging and being outside of Apache:

> cat pdo.php 
#!/usr/bin/php -q

error_reporting( E_ALL );
$extensions = get_loaded_extensions();

if( in_array( 'pdo', $extensions ) )
    echo ' extension already loaded';
    if( dl('') )
        echo ' extension loaded with dl()';
        echo ' extension failed to load with dl()';

$dsn = 'mysql:dbname=test;host=localhost';
$user = 'root';
$password = 'passwd';

try {
   $dbh = new PDO($dsn, $user, $password);
} catch (PDOException $e) {
   echo 'Connection failed: ' . $e->getMessage();


> ./pdo.php   

Warning: Module 'PDO' already loaded in Unknown on line 0 extension failed to load with dl()Connection failed: could not find driver/var/tmp/portage/php-5.0.3-r1/work/php-5.0.3/Zend/zend_execute.c(3255) :  Freeing 0x08613A4C (16 bytes), script=./pdo.php
=== Total 1 memory leaks detected ===

> head /etc/php/cli-php5/php.ini 

; This is the default settings file for new PHP installations.
; By default, PHP installs itself with a configuration suitable for
; development purposes, and *NOT* for production purposes.
 [2005-04-29 11:59 UTC] denials at gmail dot com
Sorry, but your problem does not imply a bug in PECL itself.  For a
list of more appropriate places to ask for help using PECL, please
visit as this bug system is not the
appropriate forum for asking support questions. 

Thank you for your interest in PECL.

'pdo' != 'PDO' as returned by get_loaded_extensions(), so PHP was trying to load twice. was not built or loaded when the call to the PDO constructor was issued.
PHP Copyright © 2001-2022 The PHP Group
All rights reserved.
Last updated: Fri Dec 02 23:05:54 2022 UTC