未找到Laravel PDO类

时间:2018-05-21 20:31:41

标签: laravel pdo

我正在我的托管服务器上部署我的laravel项目。 我上传文件并将它们正确链接,
但是,当我尝试访问公用文件夹时,它给了我错误:

vendor/laravel/framework/src/Illuminate/Database/Connection.php - "Class 'PDO' not found"

配置命令:

'./configure' '--build=x86_64-redhat-linux-gnu' '--host=x86_64-redhat-linux-gnu' '--target=x86_64-redhat-linux-gnu' '--program-prefix=' '--prefix=/opt/cpanel/ea-php72/root/usr' '--exec-prefix=/opt/cpanel/ea-php72/root/usr' '--bindir=/opt/cpanel/ea-php72/root/usr/bin' '--sbindir=/opt/cpanel/ea-php72/root/usr/sbin' '--sysconfdir=/opt/cpanel/ea-php72/root/etc' '--datadir=/opt/cpanel/ea-php72/root/usr/share' '--includedir=/opt/cpanel/ea-php72/root/usr/include' '--libdir=/opt/cpanel/ea-php72/root/usr/lib64' '--libexecdir=/opt/cpanel/ea-php72/root/usr/libexec' '--localstatedir=/opt/cpanel/ea-php72/root/usr/var' '--sharedstatedir=/opt/cpanel/ea-php72/root/usr/com' '--mandir=/opt/cpanel/ea-php72/root/usr/share/man' '--infodir=/opt/cpanel/ea-php72/root/usr/share/info' '--cache-file=../config.cache' '--with-libdir=lib64' '--with-config-file-path=/opt/cpanel/ea-php72/root/etc' '--with-config-file-scan-dir=/opt/cpanel/ea-php72/root/etc/php.d' '--disable-debug' '--with-pic' '--without-pear' '--with-bz2' '--with-freetype-dir=/usr' '--with-png-dir=/usr' '--with-xpm-dir=/usr' '--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl=/opt/cpanel/ea-openssl' '--with-openssl-dir=/opt/cpanel/ea-openssl' '--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp' '--enable-sockets' '--with-kerberos' '--enable-shmop' '--with-libxml-dir=/opt/cpanel/ea-libxml2' '--with-system-tzdata' '--with-mhash' '--enable-fpm' '--libdir=/opt/cpanel/ea-php72/root/usr/lib64/php' '--without-mysqli' '--disable-pdo' '--without-gd' '--disable-dom' '--disable-dba' '--without-unixODBC' '--disable-opcache' '--disable-xmlreader' '--disable-xmlwriter' '--without-sqlite3' '--disable-phar' '--disable-fileinfo' '--disable-json' '--without-pspell' '--disable-wddx' '--without-curl' '--disable-posix' '--disable-xml' '--disable-simplexml' '--disable-exif' '--without-gettext' '--without-iconv' '--disable-ftp' '--without-bz2' '--disable-ctype' '--disable-shmop' '--disable-sockets' '--disable-tokenizer' '--disable-sysvmsg' '--disable-sysvshm' '--disable-sysvsem' '--without-gmp' '--disable-calendar' 'build_alias=x86_64-redhat-linux-gnu' 'host_alias=x86_64-redhat-linux-gnu' 'target_alias=x86_64-redhat-linux-gnu'

extension_dir:

/opt/cpanel/ea-php72/root/usr/lib64/php/modules
  • 我正在使用Laravel 5.5
  • 我的主机php版本是PHP7.2

1 个答案:

答案 0 :(得分:0)

我在下面加了你的问题。

  

'./ configure'' - build = x86_64-redhat-linux-gnu'' - host = x86_64-redhat-linux-gnu'' - target = x86_64-redhat-linux-gnu'' - program-prefix ='' - prefix = / opt / cpanel / ea-php72 / root / usr'' - exec-prefix = / opt / cpanel / ea-php72 / root / usr'' - bindind = / opt / cpanel / ea-php72 / root / usr / bin''--sbindir = / opt / cpanel / ea-php72 / root / usr / sbin'' - sysconfdir = / opt / cpanel / ea-php72 / root / etc ''--dadadir = / opt / cpanel / ea-php72 / root / usr / share'' - includey = / opt / cpanel / ea-php72 / root / usr / include'' - libdir = / opt / cpanel / ea-php72 / root / usr / lib64'' - libdcdir = / opt / cpanel / ea-php72 / root / usr / libexec'' - localstatedir = / opt / cpanel / ea-php72 / root / usr / var '' - sharedstatedir = / opt / cpanel / ea-php72 / root / usr / com'' - mandir = / opt / cpanel / ea-php72 / root / usr / share / man'' - infodir = / opt / cpanel / ea-php72 / root / usr / share / info'' - cache-file = .. / config.cache'' - with-libdir = lib64'' - with-config-file-path = / opt / cpanel / ea-php72 / root / etc'' - with-config-file-scan-dir = / opt / cpanel / ea-php72 / root / etc / php.d'' - disable-debug'' --with-pic'' - without-pear'' - w ith-bz2'' - with-freetype-dir = / usr'' - with-png-dir = / usr'' - with-xpm-dir = / usr'' - enable-gd-native-ttf ''--with-gdbm'' - with-gettext'' - with-iconv'' - with-jpeg-dir = / usr'' - with-openssl = / opt / cpanel / ea-openssl' '--with-openssl-dir = / opt / cpanel / ea-openssl'' - with-zlib'' - with-layout = GNU'' - enable-exif'' - enable-ftp'' - -enable-socket“' - with-kerberos'' - enable-shmop'' - with-libxml-dir = / opt / cpanel / ea-libxml2'' - with-system-tzdata'' - with -mhash'' - enable-fpm'' - libdir = / opt / cpanel / ea-php72 / root / usr / lib64 / php'' - without-mysqli'' - disable-pdo'< / strong>' - without-gd'' - disable-dom'' - disable-dba'' - without-unixODBC'' - disable-opcache'' - disable-xmlreader'' - disable- xmlwriter'' - without-sqlite3'' - disable-phar'' - disable-fileinfo'' - disable-json'' - without-pspell'' - disable-wddx'' - without-curl '' - disable-posix'' - disable-xml'' - disable-simplexml'' - disable-exif'' - without-gettext'' - without-iconv'' - disable-ftp' '--without-bz2'' - disable-ctype' '--disable-shmop'' - disable-sockets'' - disable-tokenizer'' - disable-sysvmsg'' - disable-sysvshm'' - disable-sysvsem'' - without-gmp'' --disable-calendar''build_alias = x86_64-redhat-linux-gnu''host_alias = x86_64-redhat-linux-gnu''target_alias = x86_64-redhat-linux-gnu'

尝试使用PDO时此标志有问题的原因应该是明确的。