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?
Installing InterBase Into PHP 5.3.4
Moderator: General Moderators
Re: Installing InterBase Into PHP 5.3.4
I have gotten Apache 2.2 and PHP 5.0x to work with InterBase on our development system by uninstalled PHP 5.3.4 and pointing Apache 2.2 to PHP 5.0x that we have been using with PhpED. That worked fine. We thought our problems were solved and we had learned how to do it.
I installed Apache 2.2 on our production system. It worked fine. The http.conf files are identical on both the production and development systems. The php.ini files are identical. The version of InterBase is the same on both the production and the development systems. Both systems are running Windows 7 Professional. Apache 2.2 worked fine.
I then put PHP 5.3.5 on the production system and enabled it for PHP. That worked fine, and php scripts were processed as expected. PHP was not "installed", it was simply extracted from the .zip.
Next I edited the php.ini file and added the line "extension=php_interbase.dll" at the end of the file. Apache 2.2 failed to start. Disable that line, and Apache 2.2 runs fine.
Next I deleted the C:\php directory from the production system and copied the working PHP 5.0x directory from our development system (where it was working fine) to the production system and named it C:\php. Apache 2.2 now starts fine with the line "extension=php_interbase.dll" in php.ini and php works fine. However, we are back to where php gives the error that ibase_connect is undefined. php_interbase.dll is in C:\php\extensions, and gds32.dll is in C:\php.
So, the problem boils down to php 5.3.5 does NOT like the "extension=php_interbase.dll" line for whatever reason and there are no new instructions for how to get InterBase to work with 5.3.5, and php 5.0x accepts the line but does not implement it on the production system but does on the development system, even though both php.ini files are identical. It would appear there is a missing DLL, but I have no clue as to what it could be. I believe ibase_connect is in the php_interbase.dll, but since both systems now have identical operating systems, modules, directory structures for Apache and php, and configuration files, it is a puzzlement.
Help?
I installed Apache 2.2 on our production system. It worked fine. The http.conf files are identical on both the production and development systems. The php.ini files are identical. The version of InterBase is the same on both the production and the development systems. Both systems are running Windows 7 Professional. Apache 2.2 worked fine.
I then put PHP 5.3.5 on the production system and enabled it for PHP. That worked fine, and php scripts were processed as expected. PHP was not "installed", it was simply extracted from the .zip.
Next I edited the php.ini file and added the line "extension=php_interbase.dll" at the end of the file. Apache 2.2 failed to start. Disable that line, and Apache 2.2 runs fine.
Next I deleted the C:\php directory from the production system and copied the working PHP 5.0x directory from our development system (where it was working fine) to the production system and named it C:\php. Apache 2.2 now starts fine with the line "extension=php_interbase.dll" in php.ini and php works fine. However, we are back to where php gives the error that ibase_connect is undefined. php_interbase.dll is in C:\php\extensions, and gds32.dll is in C:\php.
So, the problem boils down to php 5.3.5 does NOT like the "extension=php_interbase.dll" line for whatever reason and there are no new instructions for how to get InterBase to work with 5.3.5, and php 5.0x accepts the line but does not implement it on the production system but does on the development system, even though both php.ini files are identical. It would appear there is a missing DLL, but I have no clue as to what it could be. I believe ibase_connect is in the php_interbase.dll, but since both systems now have identical operating systems, modules, directory structures for Apache and php, and configuration files, it is a puzzlement.
Help?
Re: Installing InterBase Into PHP 5.3.4
It appears there is a DLL php5_interbase.dll that may resolve this problem. The php_interbase.dll that I have has not been updated for many years. Does anyone have a copy of php5_interbase.dll I could try for this problem?