Skip to content
Advertisement

Connect PHP 7.4 to Firebird database: could not find driver

I’m following the docs to connect php to firebird database. I activated the extension in php.ini

;extension=openssl
extension=pdo_firebird
extension=pdo_mysql
;extension=pdo_oci
;extension=pdo_odbc
;extension=pdo_pgsql
extension=pdo_sqlite
;extension=pgsql
;extension=shmop

I restarted apache on xampp, and I copy pasted the code of the docs for testing. when I run the code I get could not find driver

what am I missing here?

environment:

  • XAMPP with PHP 7.4
  • Windows 10

Advertisement

Answer

The problem is that your installation is missing the Firebird native client library, fbclient.dll. Assuming you have installed a 64-bit XAMPP (I think that is the only option available), you need to download the Windows 64-bit Firebird installer, and use it at minimum to install the Firebird client library.

If you actually want to connect to a Firebird Server on the same system (assuming you didn’t install the 32-bit Firebird Server instead), you can install the full server (which will also install the client).

After installing fbclient.dll, you need to stop and start Apache through the XAMPP Control Panel.

You can verify if the driver is loaded properly – assuming you still have the default pages in htdocs – by going to http://localhost/dashboard/phpinfo.php, it will list the driver under “PDO_Firebird”, together with the version of fbclient.dll, if the driver was successfully loaded.

User contributions licensed under: CC BY-SA
8 People found this is helpful
Advertisement