[Bug 196903] Re: php5-mysql and pdo / pdo_mysql causes php to segfault, apache2 fails to start
Michael Ekoka
verysimple at gmail.com
Tue Mar 23 18:05:50 GMT 2010
Description of problem and resolution, for documentation purpose,
because I ran into this on Karmic:
- apache, php, libapache2-mod-php5, mysql-server have been installed via package manager (apt, adept, etc).
- then pdo and pdo_mysql were installed via pecl. pdo.ini and pdo_mysql.ini are manually created in /etc/php5/conf.d/ with instructions to load these extensions. Up to now lamp runs fine for php code that relies on pdo to connect to mysql.
- later on, php5_mysql is installed via apt-get and upon restarting apache, it seems to restart "OK", but can't resolve to virtualhosts anymore. The error logs (/var/log/apache/error.log) may contain this message:
/usr/sbin/apache2: symbol lookup error:
/usr/lib/php5/20060613/pdo_mysql.so: undefined symbol:
php_pdo_get_dbh_ce
You might see the same message if you run php from the shell.
Resolution: it seems that pdo and pdo_mysql need to be installed *after*
php5_mysql, so uninstall both with pecl (don't forget to comment out
their ini files in /etc/php5/conf.d/). If php5_mysql isn't yet
installed, do so with apt (or derivative), make sure the mysql.ini file
gets created in /etc/php5/conf.d/. If it doesn't, create one manually:
echo "extension=mysql.so" | sudo tee /etc/php5/conf.d/mysql.ini
Now, reinstall pdo and pdo_mysql (via pecl). Uncomment their conf file's
contents. Restart apache. Things should be back to normal.
--
php5-mysql and pdo / pdo_mysql causes php to segfault, apache2 fails to start
https://bugs.launchpad.net/bugs/196903
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to php5 in ubuntu.
More information about the Ubuntu-server-bugs
mailing list