Could not find driver (PDOException "could not find driver")

0

I'm trying to make a connection to my FIREBIRD database, but when I organize it correctly, I put the IP where it's located, etc. The message appears:

  

IT WAS NOT POSSIBLE TO LOCATE THE DRIVER IN c / wamp / www ////

What should I do personally?

 $user = "SYSDBA";
$pass = "masterkey";

$pdo=new PDO("firebird:localhost=IP AQUI;dbname=Duosig_producao",$user,$pass);
    
asked by anonymous 01.07.2015 / 17:03

2 answers

2

Make sure you have drive enabled you can do this:

foreach(PDO::getAvailableDrivers() as $driver) {
  echo $driver;
}

If the drive does not exist, enable the following extensions in its php.ini :

extension=php_interbase.dll
extension=php_firebird.dll

Restart apache and make sure the drive is active.

Another thing, you need to specify the path of your example database:

$str_conn = "firebird:dbname=C:\db\banco.gdb;host=localhost";

$dbh = new PDO($str_conn, "SYSDBA", "masterkey");

links: PDO FIREBIRD , FIREBIRD CONNECTION

    
01.07.2015 / 17:10
1

I was able to resolve at the beginning the correct line to enable the firebird PDO in php.ini is

extension=php_pdo_firebird.dll

And not

extension=php_firebird.dll
    
01.07.2015 / 19:56