Installing InterBase Into PHP 5.3.4
Posted: Tue Jan 18, 2011 4:29 pm
I have found a lot of conflicting advice on how to get PHP to integrate with InterBase. I have PHPEd installed on my development system, and have enabled InterBase in PHPEd's php.ini file by removing the semicolon on the line "extension=php_interbase.dll". That done, everything worked fine and I was able to write and test some PHP scripts using the InterBase server installed on that machine.
On the same system, I installed Apache 2.2 and PHP 5.3.4. PHP 5.3.4 does not have the line "extension=php_interbase.dll" in php.ini, but does include other lines for InterBase, including "ibase.allow_persistent = 1", etc. so it would appear InterBase should still be supported. When I inserted the line "extension=php_interbase.dll" at the end of 5.3.4's php.ini, Apache fails to start. So, I moved gds32.dll and php_interbase.dll into Windows\system32 and put gds32.dll into PHP and php_interbase.dll into PHP\ext. Apache still fails to start. Commenting out "extension=php_interbase.dll" in php.ini allows Apache to run normally.
The only other possible thing I have found so far is the line "--with-interbase=C:/Program Files (x86)/Borland/interbase6" is supposed to go into php.ini, so I put it in. With the following lines installed at the end of 5.3.4's php.ini file:
[PHP_Interbase]
--with-interbase=C:/Program Files (x86)/Borland/interbase6
extension=php_interbase.dll
Apache now starts and runs okay. However, PHP still does not acknowledge InterBase and gives the error:
Fatal error: Call to undefined function ibase_connect() in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\mtb.php on line 111
where line 111 is: $CDB=ibase_connect('127.0.0.1:C:\DBS\customer.gdb', $DBUsername, $DBPassword);
Again, using PHPEd on this same system, with the embedded PHP 5.3 in PHPEd, mtb.php works fine.
Help?
On the same system, I installed Apache 2.2 and PHP 5.3.4. PHP 5.3.4 does not have the line "extension=php_interbase.dll" in php.ini, but does include other lines for InterBase, including "ibase.allow_persistent = 1", etc. so it would appear InterBase should still be supported. When I inserted the line "extension=php_interbase.dll" at the end of 5.3.4's php.ini, Apache fails to start. So, I moved gds32.dll and php_interbase.dll into Windows\system32 and put gds32.dll into PHP and php_interbase.dll into PHP\ext. Apache still fails to start. Commenting out "extension=php_interbase.dll" in php.ini allows Apache to run normally.
The only other possible thing I have found so far is the line "--with-interbase=C:/Program Files (x86)/Borland/interbase6" is supposed to go into php.ini, so I put it in. With the following lines installed at the end of 5.3.4's php.ini file:
[PHP_Interbase]
--with-interbase=C:/Program Files (x86)/Borland/interbase6
extension=php_interbase.dll
Apache now starts and runs okay. However, PHP still does not acknowledge InterBase and gives the error:
Fatal error: Call to undefined function ibase_connect() in C:\Program Files (x86)\Apache Software Foundation\Apache2.2\htdocs\mtb.php on line 111
where line 111 is: $CDB=ibase_connect('127.0.0.1:C:\DBS\customer.gdb', $DBUsername, $DBPassword);
Again, using PHPEd on this same system, with the embedded PHP 5.3 in PHPEd, mtb.php works fine.
Help?