PHP PDO and oracle db "could not find driver" - php

I already enabled the extension=php_pdo_oci.dll in php and apache I also restarted the wampserver but still no still having this error Fatal error: Uncaught exception 'PDOException' with message 'could not find driver'
luck I don't know what is missing here.
Thank you in advance.

You have to install the PDO Oracle driver adapter:
http://php.net/manual/en/ref.pdo-oci.php

Related

Connecting to Sybase database using Doctrine orm and php7

I am creating a web application in php 7.2 and need to connect to a Sybase database. I am using Doctrine orm.
I have tried using the sqlanywhere driver and the pdo_sqlsrv driver to connect to Sybase.
However with sqlanywhere I am getting the error:
Warning: sasql_pconnect(): SQLAnywhere: [-832] Connection error: Connection was dropped (may not be a SQL Anywhere server)
With pdo_sqlsrv I get the error:
PDOException: SQLSTATE[HY000]: [Microsoft][ODBC Driver 13 for SQL Server]Protocol error in TDS stream.
I have googled both these errors and have not been able to resolve either.
Does anyone have any suggestions for how to connect to Sybase using php7.2 and Doctrine orm?

How to install PDO driver for PHP 5.5 to access Posgres on Mac?

I have PHP 5.5.36 running on Mac (OSX 10.10.5) and install the PDO driver with
brew install homebrew/php/php55-pdo-pgsql
However, running the line
$dbh = new PDO("postgres://localhost:5432");
generates the error:
Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in /Users/zaitsev/tests/pg-php/pdo-test.php:2
Stack trace:
#0 /Users/zaitsev/tests/pg-php/pdo-test.php(2): PDO->__construct('postgres://loca...')
#1 {main}
thrown in /Users/zaitsev/tests/pg-php/pdo-test.php on line 2
Is there anything else needed to install the driver?
You must enable the pdo driver in your php.ini file.

A Database connection using "Mysql" was missing or unable to connect

My code is executing properly on development. But on production gives following error:
Missing Database Connection
Error: A Database connection using "Mysql" was missing or unable to connect.
The database server returned this error: Selected driver is not enabled
Error: Mysql driver is NOT enabled
Mysql extension on PHP 5.5.x and above is deprecated.
On PHP 7 mysql has been removed.
You should use PDO. If you can't, then try to replace your mysql with mysqli extension.
I got the same error, but it resolved with this
yum install --enablerepo=remi,remi-php70 php-mysqlnd

php_dblib enabled but not in phpinfo (Windows)

I need to connect to a remote Sybase database with PHP 5.4.5 and I therefore enable the driver php_dblib (FreeTDS) for PHP and it shows as is in Wampserver but when I look at the phpinfo() results, there is nothing about dblib.
My application (Zend) returns
Fatal error: Uncaught exception 'PDOException' with message 'could not find driver' in ... PropelPDO->__construct('dblib:host=ans...', 'sa', '', Array)
I am running Wampserver 2.2, Apache 2.2.3 and PHP 5.4.5.
Thank you for your help.

Apache does not load PDO SQLSRV drivers ERROR: 'could not find driver'

I am trying to add the PDO drivers so I can work with MSSQL
I get error 'could not find driver'. In my php.ini I have tried adding
extension=php_pdo_sqlsrv_53_ts.dll
extension=php_pdo_sqlsrv_53_ts_vc9.dll
extension=php_pdo_sqlsrv_53_ts_vc6.dll
But my phpinfo() shows no sqlsrv in PDO, only mysql and sqlite
My PHP Version : 5.3.9
Compiler : MSVC9 (Visual C++ 2008)
I finally found my own answer...
My php.ini file that was loaded was not from
wamp\bin\php\php5.3.9\php.ini
but from
wamp\bin\apache\apache2.2.21\php.ini

Categories