模块"PDO"已加载到未知行0中 [英] Module 'PDO' already loaded in Unknown line 0

查看:103
本文介绍了模块"PDO"已加载到未知行0中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将nginx与php5-fpm一起使用,由于某种原因,我的php5-fpm一直在说模块'PDO'已加载到未知行0中",老实说,我不知道为什么.该扩展名未在php.ini中加载,但从"--with-config-file-scan-dir"加载,该加载了pdo.ini,当然也加载了pdo.so

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

我的php配置如下

'./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'

'./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.

我检查了phpinfo()来查看是否已加载PDO扩展名,并且该扩展名似乎已加载(即使从pdo.ini中删除了加载pdo.so时),但是当我尝试使用PDO时却得到了

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

致命错误:未找到"PDO"类

Fatal Error: Class 'PDO' not found

我还要指出,我也正在加载suhosin.soapc.soimagick.so,没有问题.

I'll also point out that I'm also loading suhosin.so, apc.so, and imagick.so with no problems.

已安装软件包(php和mysql)的列表希望可以提供更多信息来帮助我解决此问题.还值得注意的是,我的配置在过去6个月中一直正常运行.我使用VladGH安装脚本( https://github.com/vladgh/VladGh.com- LEMP ),因为这只是我的开发环境.如果需要的话,我非常愿意完全重新安装服务器,但我只想解决这个问题.

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.

推荐答案

来自PHP 5.1 ,PDO是PHP Core distrib的一部分,因此作为扩展名加载的pdo.so变得多余.

From PHP 5.1, PDO is part of PHP Core distrib, so pdo.so loaded as extension becomes redundant.

这篇关于模块"PDO"已加载到未知行0中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆