Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Not Loading Firebird Extension

I'm trying to use the Firebird extension in PHP. I've got the extension files (php_pdo_firebird.dll, php_interbase.dll) in my ext folder. I'm adding them in my php.ini file like so

...
[PHP_PDO_FIREBIRD]
extension=php_pdo_firebird.dll
[PHP_INTERBASE]
extension=php_interbase.dll
...

No errors are being thrown saying the extensions could not be loaded and yet whenever I print my phpinfo I don't see either of them listed. What am I missing here?

For what it's worth, I'm running PHP version 5.3.14 TS using Apache 2.2 on Windows 7.

Edit: It seems some errors are being logged, it's just that my error_log setting was being overwritten (for those seeing this, double check C:\Windows\Temp\php-errors.log). Now it's telling me the specified modules could not be found whenever the file clearly exists.

PHP Warning:  PHP Startup: Unable to load dynamic library 
    'C:\Program Files (x86)\PHP\ext\php_pdo_firebird.dll' - 
    The specified module could not be found.
    in Unknown on line 0

PHP Warning:  PHP Startup: Unable to load dynamic library 
    'C:\Program Files (x86)\PHP\ext\php_interbase.dll' - 
    The specified module could not be found.
    in Unknown on line 0
like image 746
Mike Cluck Avatar asked Feb 18 '23 06:02

Mike Cluck


1 Answers

Figured it out! Okay, first to get the basics out of the way:

  • Make sure the version of the DLLs matches your PHP version.
  • For those who use the Windows installer, for some reason it doesn't provide an option to include the Interbase and Firebird modules so you'll have to download the matching .zip file and copy them from the ext folder in there.
  • Double check for any typos, such as unescaped backslashes, in your extension_dir setting. This only applies if the value isn't "wrapped in quotation marks."

Now for the coup de grace. That error message is extremely misleading. At this point it should be finding your DLLs but it's missing one integral piece: fbclient.dll which can be found in the bin folder of your Firebird installation. Everywhere I read before said to place fbclient.dll in the ext folder but it only works if you put it in the root of your PHP folder.

Hope this helps future wayward souls :)

like image 148
Mike Cluck Avatar answered Feb 27 '23 23:02

Mike Cluck