首页 文章

找不到ZF2 Class PDO但在php配置中启用了PDO

提问于
浏览
0

我的zf2应用程序总是工作正常,但突然我开始收到此错误

致命错误:第21行/home/doaminName/public_html/xxxxx.com/config/autoload/global.php中未找到“PDO”类

我的PHP版本是native(5.4),这是phpinfo的Configure命令 . 使用此行启用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'

知道问题来自哪里?

1 回答

  • 2

    好吧,你可以尝试在第21行的global.php中创建 \PDO

    对PDOException的所有后续调用也必须是convertad .

    如果它不起作用,那么你的php是在没有PDO的情况下构建的 .

相关问题