This guide explains how to install the php-firebird extension on Windows.
Go to the Releases page and download the DLL that matches your environment.
The DLL filenames follow this convention:
php_firebird-{version}-php{php_version}-{ts|nts}-{arch}-fb{fb_version}.dll
You need to match 4 criteria:
- PHP Version: 8.1, 8.2, 8.3, or 8.4
- Thread Safety:
ts(Thread Safe) - usually for Apachents(Non Thread Safe) - usually for IIS or FastCGI- Check
php -i | findstr "Thread Safety"to be sure.
- Architecture:
x64(64-bit) - standard for modern systemsx86(32-bit) - legacy- Check
php -i | findstr "Architecture"to be sure.
- Firebird Client Version:
fb3.0- for Firebird 3.0 clientfb4.0- for Firebird 4.0 clientfb5.0- for Firebird 5.0 client
Example:
If you have PHP 8.3 (Thread Safe) x64 and want to use Firebird 5.0 client, download:
php_firebird-1.0.0-php8.3-ts-x64-fb5.0.dll
- Rename the file: Rename the downloaded file to
php_firebird.dll. - Move to extensions directory: Copy
php_firebird.dllto your PHPextdirectory (e.g.,C:\php\ext). - Edit php.ini: Add the following line to your
php.inifile:extension=php_firebird
The extension requires the Firebird client library (fbclient.dll) to be available in your system PATH or in the same directory as php.exe.
- Download the Firebird Windows ZIP kit (not the installer) matching your Firebird version (3.0, 4.0, or 5.0) and architecture (x64 or x86) from the Firebird website.
- Extract
fbclient.dllfrom the ZIP file. - Copy
fbclient.dllto your PHP root directory (wherephp.exeis located).
Note: If you already have the Firebird Server installed on the same machine, the client library might already be in your PATH. However, copying it to the PHP directory ensures the correct version is used.
Open a command prompt and run:
php -mYou should see firebird in the list of modules.
To check detailed information:
php -ri firebird- Architecture Mismatch: Ensure you didn't mix x64 PHP with x86 DLL (or vice versa).
- Thread Safety Mismatch: Ensure you didn't mix TS PHP with NTS DLL.
- Missing fbclient.dll: Ensure
fbclient.dllis in the PHP directory or PATH. - Visual C++ Redistributable: Ensure you have the Visual C++ Redistributable installed.
This usually means fbclient.dll is missing or incompatible.
This means you are trying to load a 64-bit DLL into a 32-bit PHP (or vice versa).