Problem with connecting from php to firebird database. Connection code:

$database = "192.168.1.34:C:/db.gdb"; $user = "SYSDBA"; $password = "masterkey"; $db = ibase_connect($database, $user, $password); 

However, when it is executed, the server produces an error:

 PHP Fatal error: Call to undefined function ibase_connect() 

But at the same time the necessary extensions are connected - php_interbase and php_pdo_firebird. What else could be wrong?

  • Are you sure they are connected? in php_info () checked? - Dex
  • Yes, this is the first thing checked. - FladeX

2 answers 2

 $db = @ibase_connect($database, $user, $password); 

so actually need. Could even translate the error and understand: "Call to an undefined function."

  • I translated and about the "call an undefined function" understood. The question is not that. The question is why is it indefinite, if all the necessary libraries are connected? - FladeX

So, the question was resolved. It was necessary to take the client library gds32.dll and copy it to the Apache directory. Moreover, the file must be taken exactly the same as that used in the Firebird database, otherwise it will not work.