vladgh / VladGh.com-LEMP

Latest NginX, MySQL, PHP (with APC and Suhosin)
http://vladgh.com/blog/install-nginx-and-php-php-fpm-mysql-and-apc
Apache License 2.0
160 stars 41 forks source link

Ran update_php.sh 5.4.6 and now have PDO issue. #32

Closed ellisio closed 12 years ago

ellisio commented 12 years ago

Running update_php.sh 5.4.6 resulted in me getting this when restarting php5-fpm:

service php5-fpm restart
 * Stopping PHP5 FPM...
   ...done.
 * Starting PHP5 FPM...
[20-Aug-2012 16:07:54] NOTICE: PHP message: PHP Warning:  PHP Startup: PDO: Unable to initialize module
Module compiled with module API=20090626
PHP    compiled with module API=20100525
These options need to match
 in Unknown on line 0
   ...done.

That API version looks like the PHP 5.3.x API; but I do not have that installed on my system anywhere. The only PHP installed is the 5.4.5 version before the upgrade from this script.

ellisio commented 12 years ago

I noticed if I commented out extension=pdo.so in /etc/php5/conf.d/10-pdo.ini this goes away. Is this an ini file that was installed with your script or could this have come from installing php5-dev?

vladgh commented 12 years ago

Thank you for bringing this to my attention. I will investigate it.

vladgh commented 12 years ago

I wanted to make sure before I said anything, but yes, installing php5-dev brings extensions compiled for the repository PHP version. The only ini files that this script installs into /etc/php5/conf.d are apc.ini and suhosin.ini (for PHP 5.3.x). Most likely your entire /etc/php5 configuration directory got mixed up with the official version so I would recommend deleting it completely and start over. Do not just run the update script because it will preserve your current configuration. You should also uninstall any php5-xxxx packages installed with aptitude.

ellisio commented 12 years ago

Alright, I will do. Thank you sir!