Guys,
Goodnight.
After having several problems configuring 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()
Configuration completed
- 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 configure the variables
- Edit the file php.ini (C:\xampp\php) and search for php_interbase.dll. Uncomment this line by removing the “;” character. at the beginning of the line
- Download the Firebird database 2.5.3 and install it 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 into the C:\Windows and C:\Windows\System32 directories (or copy C:\firebird\bin\fbclient.dll to the aforementioned 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:
<?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!
Until later.
Comentários (0)
Carregando comentários…