Staff,
Good evening.
After having several problems setting up a Windows PHP + Firebird environment, I decided to create this post to help other colleagues with the same problem and eliminate the error message once and for all:
Fatal error: Call to undefined function ibase_connect ()
Performed the setup
- Download the XAMPP 1.8.2 VC9 and extract the files to a local directory, preferably C: \ xampp
- Run the file setup_xamp.bat to set the variables
- Edit the file php.ini (C: \ xampp \ php) and look for php_interbase.dll. Uncomment this line by removing the “;” at the beginning of the line
- Download the Firebird 2.5.3 database and install on your computer
- Copy the php_interbase.dll file from your php \ ext directory to the C: \ Windows \ System32 directory.
- Copy the libeay32.dll and ssleay32.dll files from your php directory to the C: \ Windows \ System32 directory.
- Download of this file and extract the DLLs in the C: \ Windows and C: \ Windows \ System32 directories (or copy C: \ firebird \ bin \ fbclient.dll to the above directories and copy this file again, now named gds32.dll)
- Start Xampp Control (xampp-control.exe) and start the Apache service.
Ready, PHP + Apache + Firebird installed and integrated! Now just make PHP connect to the database:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
<?php // Conecta no banco de dados $hostname = "localhost:C:\Dados\Banco_Firebird.FDB"; $usuario = "SYSDBA"; // Usuário padrão do Firebird $senha = "masterkey"; // Senha padrão do Firebird $conexao = ibase_connect( $hostname, $usuario, $senha ) or die( 'Erro ao conectar: ' . ibase_errmsg() ); $Arr_Dados = array(); $Ds_Query = "SELECT * FROM cliente"; $Ds_Retorno = ibase_query( $Ds_Query ); while ( $Ds_Linha_Banco = ibase_fetch_row( $Ds_Retorno ) ) { $Arr_Dados[] = $Ds_Linha_Banco; } var_dump($Arr_Dados); ?> |
php firebird interbase connection can't connect does not connect how to configure connect Fatal error: Call to undefined function ibase_connect ()
php firebird interbase connection can't connect does not connect how to configure connect Fatal error: Call to undefined function ibase_connect ()
And that's it!
See you.
Hello can you help me about this error when trying to make an insert:
$query_reg = “insert into client (cli_name, cli_email) values (:name, :email) “;
shows this error below:
Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: -803 violation of PRIMARY or UNIQUE KEY constraint “CLIENTE_PRIMARY” on table “CLIENTE” Problematic key value is (“CLI_ID” = 12190) in D:\wamp64\www\ ………….. online 34
in my php.ini there is no line to comment
Hello, I need help, I tried every way available on the Internet ans help and can not connect to firebird with php. can you help me ?
Fatal error: Uncaught Error: Call to undefined connect () function in C: \ xamp \ htdocs \ firebird \ index.php: 8 Stack trace: #0 {main} thrown in C: \ xamp \ htdocs \ firebird \ index.php online 8
Face which model of Firebird, Classic, Superclassic or Embedded.
Gabriel, good night. Man, I believe it's indifferent, because the DLL works on any version, but I tested on the Classic version.