Subject Connection between Firebird and PHP
Author etancik
Hi,

First of all, I am not english native speaker so my abilities are limited.

When I try connect from PHP to Firebird I aways get this:

"Warning: ibase_connect(): Unable to complete network request to host "localhost". Failed to establish a connection. in /var/www/html/test.php on line xxxx"

Source code from PHP:

<?php
ini_set('display_errors', 'On');
error_reporting(E_ALL | E_STRICT);
echo "Running tests...<br>\n";

try {
$conn = ibase_connect('/opt/firebird/examples/empbuild/employee.fdb', 'sysdba', 'DfG4WzoN');
echo "<br>";
$conn = ibase_connect('localhost:/opt/firebird/examples/empbuild/employee.fdb','SYSDBA','DfG4WzoN','UNICODE_FSS',0,3,'admin');
echo "<br>";
$conn = ibase_connect("/opt/firebird/examples/empbuild/employee.fdb","SYSDBA","DfG4WzoN");
echo "<br>";
$conn = ibase_connect("localhost:/opt/firebird/examples/empbuild/employee.fdb", "sysdba", "DfG4WzoN");
echo "<br>";
}catch (Exception $e) {
echo $e->getMessage();
}
?>

At this moment i have clear instalation of CentOS 6.3(32bit) with all Updates + PHP 5.3.3 + FirebirdSS 2.5.2 + Intebase modul created by this: http://www.firebirdfaq.org/faq191/

Centos is installed on VMware Player.(So i can upload whole system if needed)

If i try connect to DB via isql its everything OK.
If i check state of Intebase modul via phpinfo() its loaded.
Apache is groupmember of Firebird user group and Firebird is groupmember of Apache.

If someone can help I will be very grateful.

best regards Lukas.