Reputation: 61
I'm using nginx with php5-fpm and for some reason my php5-fpm has been saying "Module 'PDO' already loaded in Unknown line 0" and honestly I have no idea why. The extension isn't loaded inside of php.ini but it's loaded from "--with-config-file-scan-dir" which loads pdo.ini and of course that loads pdo.so
my php config is as follows
'./configure' '--prefix=/opt/php5' '--with-config-file-path=/etc/php5' '--with-config-file-scan-dir=/etc/php5/conf.d' '--with-curl' '--with-pear' '--with-gd' '--with-jpeg-dir' '--with-png-dir' '--with-zlib' '--with-xpm-dir' '--with-freetype-dir' '--with-t1lib' '--with-mcrypt' '--with-mhash' '--with-mysql' '--with-mysqli' '--with-pdo-mysql' '--with-openssl' '--with-xmlrpc' '--with-xsl' '--with-bz2' '--with-gettext' '--with-readline' '--with-fpm-user=www-data' '--with-fpm-group=www-data' '--disable-debug' '--enable-fpm' '--enable-cli' '--enable-inline-optimization' '--enable-exif' '--enable-wddx' '--enable-zip' '--enable-bcmath' '--enable-calendar' '--enable-ftp' '--enable-mbstring' '--enable-soap' '--enable-sockets' '--enable-sqlite-utf8' '--enable-shmop' '--enable-dba' '--enable-sysvsem' '--enable-sysvshm' '--enable-sysvmsg'
I can't seem to find a solution that works for me.
I checked my phpinfo()
to see if the PDO extension was loaded and it seems to be loaded (even when I remove loading the pdo.so from pdo.ini) yet when I try to use PDO I get
Fatal Error: Class 'PDO' not found
I'll also point out that I'm also loading suhosin.so
, apc.so
, and imagick.so
with no problems.
List of installed packages (php and mysql) hopefully this can provide some more information to help me out with this. It is also worth noting that my configuration has been working for the past 6 months without a hitch. I installed it using the VladGH install script (https://github.com/vladgh/VladGh.com-LEMP) since it is just my dev environment. If need be I am more than willing to do a complete re-install of my server but I would rather just figure this out.
dpkg --get-selections | grep php
libapache2-mod-php5 install
php5-cgi install
php5-cli install
php5-common install
php5-mysql install
php5-suhosin install
dpkg --get-selections | grep mysql
courier-authlib-mysql install
libdbd-mysql-perl install
libmysql++3 deinstall
libmysqlclient16 install
mysql-client-5.1 install
mysql-client-core-5.1 install
mysql-common install
mysql-server install
mysql-server-5.1 install
mysql-server-core-5.1 install
php5-mysql install
postfix-mysql install
After trying numerous solutions on how to fix this problem I have just decided to do a complete re-install on my machine.
Upvotes: 4
Views: 10623
Reputation: 5615
From PHP 5.1, PDO is part of PHP Core distrib, so pdo.so
loaded as extension becomes redundant.
Upvotes: 5
Reputation: 5
In my case, it helped: apt-get install --reinstall php5-mysql
Upvotes: 0