@meet-bhagdev
Thanks for your response.
Thanks for your response.
- Could Not Find Driver Php Docker
- Windows Could Not Find Driver
- Could Not Find Driver Php Sqlite
- Could Not Find Driver Php Artisan Migrate
- Could Not Find Driver Sqlsrv Php
Aug 01, 2016 Track tasks and feature requests. Join 40 million developers who use GitHub issues to help identify, assign, and keep track of the features and bug fixes your projects need. For your installation, it may be different, but only the path of pdomysql.so, pdo.so, mysqli.so. So, this is why Drupal or any other php engine couldn't find the library and shows that error: PDOException: could not find driver. Then try to check logs, it should have more information than 'could not find driver' I had same issue with WAMP, but then I just installed MS c and tried few versions of phpsqlsrv. Also restart is needed, at least in wamp. – Eimsas Apr 19 '17 at 8:23.
[root@dev ~]# odbcinst -q -d -n 'ODBC Driver 13 for SQL Server'
[ODBC Driver 13 for SQL Server]
Description=Microsoft ODBC Driver 13 for SQL Server
Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.0.so.0.0
Threading=1
UsageCount=2
[ODBC Driver 13 for SQL Server]
Description=Microsoft ODBC Driver 13 for SQL Server
Driver=/opt/microsoft/msodbcsql/lib64/libmsodbcsql-13.0.so.0.0
Threading=1
UsageCount=2
It is helpful to put your code into php tags; they are not available on the quick reply but you have to go to the advanced reply section. As you guessed you need to enable or install a MySQL. Nov 01, 2017 IlluminateDatabaseQueryException could not find driver (SQL: select. from informationschema.tables where tableschema = test and tablename = migrations) PDOException could not find driver.
[root@dev ~]# php -m
[PHP Modules]
......
PDO
pdo_mysql
PDO_OCI
PDO_ODBC
pdo_sqlite
pdo_sqlsrv
......
sqlsrv
......
[PHP Modules]
......
PDO
pdo_mysql
PDO_OCI
PDO_ODBC
pdo_sqlite
pdo_sqlsrv
......
sqlsrv
......
[Zend Modules]
Zend OPcache
Zend OPcache
[root@dev ~]# php -v
PHP 7.0.9 (cli) (built: Aug 8 2016 12:22:02) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.9, Copyright (c) 1999-2016, by Zend Technologies
PHP 7.0.9 (cli) (built: Aug 8 2016 12:22:02) ( NTS )
Copyright (c) 1997-2016 The PHP Group
Zend Engine v3.0.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.9, Copyright (c) 1999-2016, by Zend Technologies
[root@dev ~]# php -i
......
PDO
PDO support => enabled
PDO drivers => oci, odbc, sqlite, mysql, sqlsrv
......
PDO_ODBC
PDO Driver for ODBC (unixODBC) => enabled
ODBC Connection Pooling => Enabled, strict matching
......
pdo_sqlsrv
pdo_sqlsrv support => enabled
ExtensionVer => 4.0.2.0
Directive => Local Value => Master Value
pdo_sqlsrv.client_buffer_max_kb_size => 10240 => 10240
pdo_sqlsrv.log_severity => 0 => 0
......
sqlsrv
sqlsrv support => enabled
ExtensionVer => 4.0.2.0
Directive => Local Value => Master Value
sqlsrv.ClientBufferMaxKBSize => 10240 => 10240
sqlsrv.LogSeverity => 0 => 0
sqlsrv.LogSubsystems => 0 => 0
sqlsrv.WarningsReturnAsErrors => On => On
......
......
PDO
PDO support => enabled
PDO drivers => oci, odbc, sqlite, mysql, sqlsrv
......
PDO_ODBC
PDO Driver for ODBC (unixODBC) => enabled
ODBC Connection Pooling => Enabled, strict matching
......
pdo_sqlsrv
pdo_sqlsrv support => enabled
ExtensionVer => 4.0.2.0
Directive => Local Value => Master Value
pdo_sqlsrv.client_buffer_max_kb_size => 10240 => 10240
pdo_sqlsrv.log_severity => 0 => 0
......
sqlsrv
sqlsrv support => enabled
ExtensionVer => 4.0.2.0
Directive => Local Value => Master Value
sqlsrv.ClientBufferMaxKBSize => 10240 => 10240
sqlsrv.LogSeverity => 0 => 0
sqlsrv.LogSubsystems => 0 => 0
sqlsrv.WarningsReturnAsErrors => On => On
......
[root@dev ~]# cat /web/test.php
Could Not Find Driver Php Docker
';} catch ( PDOException $e ) { echo 'The connection failed: ' . $e->getMessage (); }?>
result:
The connection failed: could not find driver.
The connection failed: could not find driver.
Windows Could Not Find Driver
[root@dev ~]# cat /usr/local/php/etc/php.ini
......
date.timezone = PRC
include_path = '/usr/local/php/lib/php'
extension=php_sqlsrv_7_nts.so
extension=php_pdo_sqlsrv_7_nts.so
zend_extension=opcache.so
......
date.timezone = PRC
include_path = '/usr/local/php/lib/php'
extension=php_sqlsrv_7_nts.so
extension=php_pdo_sqlsrv_7_nts.so
zend_extension=opcache.so
Configure Command:
./buildconf --force
./configure LIBS=-lodbc
--prefix=/usr/local/php
--with-apxs2=/usr/local/httpd/bin/apxs
--with-config-file-path=/usr/local/php/etc
--enable-pdo
--with-mysqli=/usr/local/mysql/bin/mysql_config
--with-pdo-mysql=mysqlnd
--with-pdo-oci=instantclient,/usr,12.1.0.2
--with-oci8=instantclient,/usr/lib/oracle/12.1/client64/lib,12.1.0.2
--with-unixODBC=/usr
--with-pdo-odbc=unixODBC,/usr
--with-sqlite3
--with-pdo-sqlite
--with-iconv=/usr/local/libiconv
--with-zlib=/usr/local/zlib
--with-zlib-dir=/usr/local/zlib
--with-openssl=/usr/local/ssl
--with-pcre-dir=/usr/local/pcre
./buildconf --force
./configure LIBS=-lodbc
--prefix=/usr/local/php
--with-apxs2=/usr/local/httpd/bin/apxs
--with-config-file-path=/usr/local/php/etc
--enable-pdo
--with-mysqli=/usr/local/mysql/bin/mysql_config
--with-pdo-mysql=mysqlnd
--with-pdo-oci=instantclient,/usr,12.1.0.2
--with-oci8=instantclient,/usr/lib/oracle/12.1/client64/lib,12.1.0.2
--with-unixODBC=/usr
--with-pdo-odbc=unixODBC,/usr
--with-sqlite3
--with-pdo-sqlite
--with-iconv=/usr/local/libiconv
--with-zlib=/usr/local/zlib
--with-zlib-dir=/usr/local/zlib
--with-openssl=/usr/local/ssl
--with-pcre-dir=/usr/local/pcre
or
Could Not Find Driver Php Sqlite
./buildconf --force
./configure LIBS=-lodbc
--prefix=/usr/local/php
--with-apxs2=/usr/local/httpd/bin/apxs
--with-config-file-path=/usr/local/php/etc
--enable-pdo=shared
--with-mysqli=/usr/local/mysql/bin/mysql_config
--with-pdo-mysql=shared,mysqlnd
--enable-mysqlnd
--with-sqlite3=shared,/usr/local/sqlite3
--with-pdo-sqlite=shared,/usr/local/sqlite3
--with-pdo-oci=shared,instantclient,/usr,12.1.0.2
--with-oci8=shared,instantclient,/usr/lib/oracle/12.1/client64/lib,12.1.0.2
--with-unixODBC=shared,/usr
--with-pdo-odbc=shared,unixODBC,/usr
--with-iconv=/usr/local/libiconv
--with-zlib=/usr/local/zlib
--with-zlib-dir=/usr/local/zlib
--with-openssl=/usr/local/ssl
--with-pcre-dir=/usr/local/pcre
./configure LIBS=-lodbc
--prefix=/usr/local/php
--with-apxs2=/usr/local/httpd/bin/apxs
--with-config-file-path=/usr/local/php/etc
--enable-pdo=shared
--with-mysqli=/usr/local/mysql/bin/mysql_config
--with-pdo-mysql=shared,mysqlnd
--enable-mysqlnd
--with-sqlite3=shared,/usr/local/sqlite3
--with-pdo-sqlite=shared,/usr/local/sqlite3
--with-pdo-oci=shared,instantclient,/usr,12.1.0.2
--with-oci8=shared,instantclient,/usr/lib/oracle/12.1/client64/lib,12.1.0.2
--with-unixODBC=shared,/usr
--with-pdo-odbc=shared,unixODBC,/usr
--with-iconv=/usr/local/libiconv
--with-zlib=/usr/local/zlib
--with-zlib-dir=/usr/local/zlib
--with-openssl=/usr/local/ssl
--with-pcre-dir=/usr/local/pcre
[root@dev ~]# httpd -V
Server version: Apache/2.4.23 (Unix)
Server built: Aug 8 2016 01:24:13
Server's Module Magic Number: 20120211:61
Server loaded: APR 1.5.2, APR-UTIL 1.5.4
Compiled using: APR 1.5.2, APR-UTIL 1.5.4
Architecture: 64-bit
Server MPM: prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT='/usr/local/httpd'
-D SUEXEC_BIN='/usr/local/httpd/bin/suexec'
-D DEFAULT_PIDLOG='logs/httpd.pid'
-D DEFAULT_SCOREBOARD='logs/apache_runtime_status'
-D DEFAULT_ERRORLOG='logs/error_log'
-D AP_TYPES_CONFIG_FILE='conf/mime.types'
-D SERVER_CONFIG_FILE='conf/httpd.conf'
Server version: Apache/2.4.23 (Unix)
Server built: Aug 8 2016 01:24:13
Server's Module Magic Number: 20120211:61
Server loaded: APR 1.5.2, APR-UTIL 1.5.4
Compiled using: APR 1.5.2, APR-UTIL 1.5.4
Architecture: 64-bit
Server MPM: prefork
threaded: no
forked: yes (variable process count)
Server compiled with....
-D APR_HAS_SENDFILE
-D APR_HAS_MMAP
-D APR_HAVE_IPV6 (IPv4-mapped addresses enabled)
-D APR_USE_SYSVSEM_SERIALIZE
-D APR_USE_PTHREAD_SERIALIZE
-D SINGLE_LISTEN_UNSERIALIZED_ACCEPT
-D APR_HAS_OTHER_CHILD
-D AP_HAVE_RELIABLE_PIPED_LOGS
-D DYNAMIC_MODULE_LIMIT=256
-D HTTPD_ROOT='/usr/local/httpd'
-D SUEXEC_BIN='/usr/local/httpd/bin/suexec'
-D DEFAULT_PIDLOG='logs/httpd.pid'
-D DEFAULT_SCOREBOARD='logs/apache_runtime_status'
-D DEFAULT_ERRORLOG='logs/error_log'
-D AP_TYPES_CONFIG_FILE='conf/mime.types'
-D SERVER_CONFIG_FILE='conf/httpd.conf'
Could Not Find Driver Php Artisan Migrate
The test URL:
http://i-up.vicp.cc/info.php
http://i-up.vicp.cc/pdo-test.php
http://i-up.vicp.cc/info.php
http://i-up.vicp.cc/pdo-test.php
Could Not Find Driver Sqlsrv Php
Compiled into static or dynamic modules can not solve this problem.
The problem has been bothering me for a lot of days. Hope to get your help.thanks.
The problem has been bothering me for a lot of days. Hope to get your help.thanks.