PDO module already loaded in Unknown line 0

I use nginx with php5-fpm, and for some reason my php5-fpm said that the "PDO of the module" is already loaded in the "Unknown line 0", and frankly, I have no idea why. The extension is not loaded inside php.ini, but it is loaded from "--with-config-file-scan-dir", which loads pdo.ini and, of course, 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 not find a solution that works for me.

I checked my phpinfo() to see if the PDO extension was downloaded and it seems to be loaded (even when I remove the pdo.so download from pdo.ini), but when I try to use PDO, I get

Fatal error: class "PDO" not found

I will also point out that I also download suhosin.so , apc.so and imagick.so without any problems.

A list of installed packages (php and mysql), hope this can provide additional information to help me with this. It is also worth noting that my configuration has been working for the last 6 months without a hitch. I installed it using the VladGH script installation ( https://github.com/vladgh/VladGh.com-LEMP ), since this is only my development environment. If necessary, I am more than ready to do a complete reinstallation of my server, but I would rather just figure it 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 several attempts to solve this problem, I decided to completely reinstall on my machine.

+4
source share
2 answers

From PHP 5.1, PDO is part of the PHP Core distribution, so pdo.so loads as the extension becomes redundant.

+5
source

In my case, it helped: apt-get install --reinstall php5-mysql

0
source

Source: https://habr.com/ru/post/1397007/


All Articles