[Bug 1034454] [NEW] 12.04 Dist-upgrade breaks PHP extensions > pdo_mysql.so symbols
aardvarkchris
chris.adam.smith at gmail.com
Wed Aug 8 15:55:40 UTC 2012
Public bug reported:
Bug Report: PHP Unable to load dynamic library pdo_mysql.so
[ Basic Information | Desired/Actual Behaviour | Steps to reproduce | More Info (incl. PHP Info) | System Information | Apport]
Hopefully I have included all relevant information here. Please let me
know if you need more or if anything is unclear :)
Basic Information: Ubuntu 12.04 LTS x64, Apache 2.2.22 (Built Feb 13
2012), PHP 5.4.1 (although DPKG states installed packages are
php5_5.3.10), php5-mysql (*not* php5-mysqlnd)
Desired Behaviour:
Launch PHP with PDO mysql_driver error free, enabled and working.
Actual Behaviour:
PHP launches with error in logfile:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/pdo_mysql.so' - /usr/lib/php5/20090626/pdo_mysql.so: undefined symbol: pdo_parse_params in Unknown on line 0
Steps to Reproduce:
Install Ubuntu 12.04 LTS
Successfully install php5, php-mysql using apt-get (no errors or warnings):
sudo apt-get install php5
sudo apt-get install php5-mysql
Install Symfony and Streeme with instructions on Google Code (basically
svn co http://streeme.url)
Perform package & distribution upgrade:
apt-get dist-upgrade
Start PHP:
service apache2 restart
Receive warning in error log:
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib/php5/20090626/pdo_mysql.so' - /usr/lib/php5/20090626/pdo_mysql.so: undefined symbol: pdo_parse_params in Unknown on line 0
[Further steps to reproduce]
Attempt to rescan music (./symfony scan-media --type=filesystem)
Receive warning:
Couldn't locate driver named mysql
More Info:
[ Description | PHP Info | Related Files ]
I have recently upgraded (via sudo apt-get dist-upgrade) my system to 12.04 Ubuntu x64.
Previously I had a very nice app called Streeme, which I used to listen
to my music anywhere. It uses a framework called Symfony (Streeme
requires Symfony <=1.4), and hooks into a mySQL database where it stores
all of it's 'stuff' (library info, paths, users, etc).
I have a working PHP5 and mySQL setup on the machine. This is verified
by the use of eGroupware and phpMyAdmin (plus PHP scripts which will
happily talk to the mySQL database using mysql_connect()). Four weeks
ago the Apache2 webserver apache2 was replaced in place with the apache2
-mtm-itk package to allow the webserver to function with different UIDs.
This was reversed two weeks ago, but the problem still exists. Before,
during and after there was no issue with mySQL access through phpMyAdmin
or eGroupware, or a PHP script.
Attempting to revive Streeme after the upgrade (not everything works
directly after an upgrade and from experience a new Streeme installation
is preferable to stitching an old one together, although I don't know
why- plus the hard drive with all the music on it got a kicking from
which it could not recover, so I might as well start again!) has totally
failed with the error:
Couldn't locate driver named mysql
Obviously this is a symfony framework error. However, I know that mysql
should be available. After some investigation, it turns out Symfony uses
PDO (particularly pdo_mysql) to access the database (and, in turn,
during a media scan or doctrine installation (think bootstrapping) PHP
directs Symfony). Further investigation directed me to check that the
pdo was enabled correctly, so please see the following from php_info():
Loaded Configuration File /etc/php5/apache2/php.ini
.ini files parsed: ... /etc/php5/apache2/conf.d/pdo_mysql.ini ...
PHP API 20090626
PHP Extension 20090626
extension_dir /usr/lib/php5/20090626
mysql
MySQL Support enabled
Active Persistent Links 0
Active Links 0
Client API version 5.5.24
MYSQL_MODULE_TYPE external
MYSQL_SOCKET /var/run/mysqld/mysqld.sock
MYSQL_INCLUDE -I/usr/include/mysql
MYSQL_LIBS -L/usr/lib/x86_64-linux-gnu -lmysqlclient_r
mysql.allow_local_infile On On
mysql.allow_persistent On On
mysql.connect_timeout 60 60
mysql.default_host no value no value
mysql.default_password no value no value
mysql.default_port no value no value
mysql.default_socket /var/run/mysqld/mysqld.sock /var/run/mysqld/mysqld.sock
mysql.default_user no value no value
mysql.max_links Unlimited Unlimited
mysql.max_persistent Unlimited Unlimited
mysql.trace_mode Off Off
PDO
PDO support enabled
PDO drivers mysql, sqlite
So PDO is, theoretically, enabled. There is a similar output when using
the CLI configuration file (/etc/php5/cli/php.ini)
However there is an error appearing in the PHP error log:
PHP Warning: PHP Startup: Unable to load dynamic library
'/usr/lib/php5/20090626/pdo_mysql.so' -
/usr/lib/php5/20090626/pdo_mysql.so: undefined symbol: pdo_parse_params
in Unknown on line 0
Which seems to indicate that there is no file there (which is not true):
-rw-r--r-- 1 root root 31056 Jun 13 18:36 /usr/lib/php5/20090626/pdo_mysql.so
(In fact, all PDO related symbols have a timestamp of June 13, 18:36)
I have checked in all /etc/php5/*/ folders for conf.d/pdo.ini, mysql.ini, pdo_mysql.ini and they all exist and have the correct directives:
[e.g:]
; configuration for php PDO module
extension=pdo.so
But if I ask for the extension_dir using: php -c /etc/php2/apache2/php.ini -i |grep extension_dir
extension_dir => /usr/local/lib/php/extensions/no-debug-zts-20100525 => /usr/local/lib/php/extensions/no-debug-zts-20100525
This directory (/usr/local/lib/php/extensions/no-debug-zts-20100525)
does not exist, but PHP does not seem to look for it or use it anyway
(nothing in the error log or php_info() mentions this folder). It is not
even mentioned in any of the common configuration files, so I have *no
idea* where PHP gets this information.
So it seems that somewhere, most likely in some upgrade, this file was
altered and refuses to load, causing symfony, and other packages which
depend on the mysql PDO driver, to fail.
I have tried to dpkg-reconfigure the various packages mentioned below
but it does not fix the problem. Everything else to do with PHP works. I
can only see that this is a bug with PHP which is causing symfony to
fail to find the correct drivers it requires. This has worked previously
on this machine.
Further Information:
[ PHP Version | Debsums | PHP Package versions | OS Information | ldd Output ]
Output of php -c /etc/php5/apache2 --version
PHP 5.4.1 (cli) (built: Apr 29 2012 18:27:47)
Copyright (c) 1997-2012 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2012 Zend Technologies
Debsums info:
debsums -e php5-common
/etc/php5/conf.d/pdo.ini OK
/etc/cron.d/php5 OK
debsums -e libapache2-mod-php5
/etc/apache2/mods-available/php5.load OK
/etc/apache2/mods-available/php5.conf OK
debsums -e php5-mysql
/etc/php5/conf.d/mysqli.ini OK
/etc/php5/conf.d/mysql.ini OK
/etc/php5/conf.d/pdo_mysql.ini OK
PHP Installed Packages (despite php --version stating PHP version is 5.4.1)
php5_5.3.10-1ubuntu3.2_all.deb
php5-cli_5.3.10-1ubuntu3.2_amd64.deb
php5-common_5.3.10-1ubuntu3.2_amd64.deb
php5-curl_5.3.10-1ubuntu3.2_amd64.deb
php5-dev_5.3.10-1ubuntu3.2_amd64.deb
php5-gd_5.3.10-1ubuntu3.2_amd64.deb
php5-ldap_5.3.10-1ubuntu3.2_amd64.deb
php5-mysql_5.3.10-1ubuntu3.2_amd64.deb
php5-sqlite_5.3.10-1ubuntu3.2_amd64.deb
php-db_1.7.13-2_all.deb
php-geshi_1.0.8.4-1_all.deb
php-http_1.4.1-1_all.deb
php-pear_5.3.10-1ubuntu3.2_all.deb
apt-cache policy php5
php5:
Installed: 5.3.10-1ubuntu3.2
Candidate: 5.3.10-1ubuntu3.2
Version table:
*** 5.3.10-1ubuntu3.2 0
500 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
100 /var/lib/dpkg/status
5.3.10-1ubuntu3 0
500 http://gb.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
apt-cache policy php5-mysql
php5-mysql:
Installed: 5.3.10-1ubuntu3.2
Candidate: 5.3.10-1ubuntu3.2
Version table:
*** 5.3.10-1ubuntu3.2 0
500 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
100 /var/lib/dpkg/status
5.3.10-1ubuntu3 0
500 http://gb.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
php5-common:
Installed: 5.3.10-1ubuntu3.2
Candidate: 5.3.10-1ubuntu3.2
Version table:
*** 5.3.10-1ubuntu3.2 0
500 http://gb.archive.ubuntu.com/ubuntu/ precise-updates/main amd64 Packages
500 http://security.ubuntu.com/ubuntu/ precise-security/main amd64 Packages
100 /var/lib/dpkg/status
5.3.10-1ubuntu3 0
500 http://gb.archive.ubuntu.com/ubuntu/ precise/main amd64 Packages
Release Information: lsb_release -rd
Description: Ubuntu 12.04 LTS
Release: 12.04
OS Information: uname -a
Linux [snip] 3.2.0-25-generic #40-Ubuntu SMP Wed May 23 20:30:51 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux
ldd /usr/lib/php5/20090626/pdo_mysql.so
linux-vdso.so.1 => (0x00007fff05fe1000)
libmysqlclient.so.18 => /usr/lib/x86_64-linux-gnu/libmysqlclient.so.18 (0x00007f85b1123000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f85b0d66000)
libz.so.1 => /lib/x86_64-linux-gnu/libz.so.1 (0x00007f85b0b4e000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f85b094a000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f85b072d000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f85b0432000)
/lib64/ld-linux-x86-64.so.2 (0x00007f85b188a000)
Apport:
Unfortunately apport has not registered a crash.
apport-cli -p php5 --save ~/php5.bug
No pending crash reports. Try --help for more information.
apport-cli -p php5-mysql --save ~/php5mysql.bug
No pending crash reports. Try --help for more information.
** Affects: php5 (Ubuntu)
Importance: Undecided
Status: New
** Tags: pdo php-mysql precise
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to php5 in Ubuntu.
https://bugs.launchpad.net/bugs/1034454
Title:
12.04 Dist-upgrade breaks PHP extensions > pdo_mysql.so symbols
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/php5/+bug/1034454/+subscriptions
More information about the Ubuntu-server-bugs
mailing list