【发布时间】:2015-12-08 02:41:55
【问题描述】:
我的 zf2 应用程序一直运行良好,但突然我开始收到此错误
致命错误:在第 21 行的 /home/doaminName/public_html/xxxxx.com/config/autoload/global.php 中找不到类“PDO”
我的 PHP 版本是原生的 (5.4),这里是来自 phpinfo 的配置命令。 PDO 通过这一行启用 --enable-pdo=shared。
'./configure' '--enable-bcmath' '--enable-calendar' '--enable-exif' '--enable-ftp' '--enable-gd-native-ttf' '--enable-libxml' '--enable-mbstring' '--enable-pdo=shared' '--enable-soap' '--enable-sockets' '--enable-zip' '--prefix=/usr/local' '--with-bz2' '--with-curl=/opt/curlssl/' '--with-freetype-dir=/usr' '--with-gd' '--with-gettext' '--with-imap=/opt/php_with_imap_client/' '--with-imap-ssl=/usr' '--with-jpeg-dir=/usr' '--with-kerberos' '--with-libdir=lib64' '--with-libexpat-dir=/usr' '--with-libxml-dir=/opt/xml2' '--with-libxml-dir=/opt/xml2/' '--with-mcrypt=/opt/libmcrypt/' '--with-mysql=/usr' '--with-mysql-sock=/var/lib/mysql/mysql.sock' '--with-mysqli=/usr/bin/mysql_config' '--with-openssl=/usr' '--with-openssl-dir=/usr' '--with-pcre-regex=/opt/pcre' '--with-pdo-mysql=shared' '--with-pdo-sqlite=shared' '--with-pic' '--with-png-dir=/usr' '--with-tidy=/opt/tidy/' '--with-xmlrpc' '--with-xpm-dir=/usr' '--with-zlib' '--with-zlib-dir=/usr'
知道问题出在哪里吗?
【问题讨论】:
-
在 PHP 文件中尝试
<?php phpinfo();以查看您的 PHP 是如何配置的。也许您需要在php.ini中启用 PDO?您的主机发生了一些变化 - 您管理此服务器吗?尝试重新启动 Apache。
标签: php mysql pdo zend-framework2