php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Bug #57855 PDO_MYSQL causing Apache segfault
Submitted: 2007-09-28 16:38 UTC Modified: 2008-05-13 09:03 UTC
From: jon dot bertsch at ucop dot edu Assigned:
Status: Not a bug Package: PDO_MYSQL (PECL)
PHP Version: 5.2.1 OS: SUSE 9
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: jon dot bertsch at ucop dot edu
New email:
PHP Version: OS:

 

 [2007-09-28 16:38 UTC] jon dot bertsch at ucop dot edu
Description:
------------
After runnig the pecl install PDO_MYSQl command the package is 
installed.

After adding the extension line to php.ini and restarting 
apache restart fails.

I have installed the same package on a different server 
sucessfully. They are pretty much identical. However, the .so 
that gets built for the current PDO_MYSQL download is 
different in size between the two machines. 

Reproduce code:
---------------
Apache error log:

 [notice] caught SIGTERM, shutting down
 
[notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)
/usr/sbin/httpd2-prefork: symbol lookup error: /usr/local/lib/php/extensions/no-debug-non-zts-20060613/pdo_mysql.so: undefined symbol: php_pdo_declare_long_constant
 
[notice] suEXEC mechanism enabled (wrapper: /usr/sbin/suexec2)

 [notice] Apache/2.0.49 (Linux/SuSE) configured -- resuming normal operations



Expected result:
----------------
restart.



Actual result:
--------------
No restart of apache

/usr/sbin/rcapache2 start
Starting httpd2 (prefork)        failed


Patches

Pull Requests

History

AllCommentsChangesGit/SVN commitsRelated reports
 [2007-10-22 11:28 UTC] crescentfreshpot at yahoo dot com
Same problem with php 5.2.4 on Red Hat 9.

php configured with:
./configure \
 --with-config-file-path=/etc/httpd/conf \
 --with-apxs2=/usr/sbin/apxs \
 --with-libxml-dir=/usr/lib \
 --with-zlib \
 --with-mysql \
 --with-libdir=lib64 \
 --enable-pdo=shared \
 --with-pdo-sqlite=shared \
 --with-sqlite=shared

pdo_mysql installed with:
pecl install pdo_mysql
 [2007-10-30 12:02 UTC] matt at echristianwebhosting dot com
Experiencing this error as well with php5.2.4 on CentOS Enterprise 3.9.
 [2007-11-30 17:33 UTC] cebesius at cebesius dot com
Experiencing this bug on Ubuntu 7.10 PHP Version 5.2.3-1ubuntu6.1

After adding "extension=pdo_mysql.so" to php.ini, Apache2 fails to start.  When running php -a, I get:

php: symbol lookup error: /usr/lib/php5/20060613/pdo_mysql.so: undefined symbol: php_pdo_declare_long_constant
 [2008-01-21 07:09 UTC] sunny at hostingzoom dot com
PHP 5.2.4
CentOS release 4.6 (Final) PHP 5.2.4
php -v
php: symbol lookup error: /usr/local/lib/php/extensions/no-debug-non-zts-20020429/pdo_mysql.so: undefined symbol: php_pdo_declare_long_constant
 [2008-02-21 12:34 UTC] aw at anexia dot at
Same Problem here.


workaround:
-----------
i recompiled php with "... --with-pdo-mysql ..." (without pecl install PDO_MYSQL) and now it works.

however: pecl install... fails
 [2008-05-11 03:30 UTC] michaelbaker at westnet dot com dot au
For those of you having that problem on Ubuntu/Debian I noticed when installing php-pear from Aptitude it also installed php4-dev & php4-common which is causing these PDO errors on compile time... apt-get rmeove php4-dev php4-common then pecl install... Should fix it also note the php5-mysql package provides PDO
 [2008-05-13 09:03 UTC] johannes at schlueters dot de
Problem seems to be related to Ubuntu's packages.
 [2008-07-11 09:52 UTC] dsutherland at ebuyer dot com
FWIW I had this issue (it appears to be caused by an Ubuntu update) and fixed it by simply re-installing both PDO_mysql and PDO i.e.:

# pecl uninstall PDO_mysql
# pecl uninstall PDO
# pecl install PDO
# pecl install PDO_mysql
 [2008-07-21 21:55 UTC] dbeecher at tekops dot com
This problem is not bogus and is not a unbuntu issue.  It happens on multiple vendor versions of Linux, Sunos and HPUX.  I have seen it on all of them.  After 3 days I finally figured it out:  This problem is caused by an incompatibility between the embedded PDO in php and the PDO modules.

If you compile PHP with --disable-pdo and then use PEAR/PECL to add PDO and PDO_MYSQL, PDO_INFORMIX, etc., the all work well and it solves this issue.

I have done it on several versions of Linux and HPUX.

I just did it today with php-5.2.4:

PHP 5.2.4 (cli) (built: Jul 21 2008 21:19:07) 
Copyright (c) 1997-2007 The PHP Group
Zend Engine v2.2.0, Copyright (c) 1998-2007 Zend Technologies

 php -i |egrep "pdo|PDO"
Configure Command =>  './configure'  '--disable-pdo' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-openssl=/usr' '--enable-force-cgi-redirect' '--with-gd' '--with-jpeg-dir=/usr/lib' '--with-zlib' '--enable-bcmath' '--enable-mbstring=all' '--with-curl'
PDO
PDO support => enabled
PDO drivers => mysql, informix
pdo_informix
pdo_informix support => enabled
pdo_mysql
PDO Driver for MySQL, client library version => 5.0.51a

Good Luck,
David

--
David Beecher, Sr. Engineer
TekOps, Inc.
http://www.tekops.com

On time, under budget, and according to specification!
 
PHP Copyright © 2001-2025 The PHP Group
All rights reserved.
Last updated: Mon May 12 21:01:29 2025 UTC