Apache, PHP, Oracle and Windows

Status
Not open for further replies.

HaMMerHeD

[H]F Junkie
Joined
Jul 13, 2004
Messages
10,397
So I had a failure on an ancient Sun UltraSPARC server which was hosting an old PHP app. The server experienced some core software failure, and for various reasons, it is being abandoned.

But we still have this old, poorly coded internal PHP app that needs to be hosted. It has some specific requirements, which have limited our choices rather severely. Basically, the app won't work with any PHP interpreter newer than 5.3. It really is a badly coded app, and it's being replaced next year, but in the meantime, I have to get it running.

After going through our options, we decided to set it up on a Windows server. So I have this box (running Windows 7 Pro) onto which I have installed PHP 5.3.29, Apache httpd 2.2.225, OpenSSL 0.9.8y, Oracle Instant Client 12.1.0.2.0, and the PECL OCI8 library for Oracle 12c and PHP 5.2+ (php_oci8_12c.dll), php-oci8-2.0.12.5-3-nts.

All of these are using 32-bit options, since I couldn't find x86-64 compiled binaries for all of them.

Apache is configured correctly and running. The OpenSSL configuration is set and the certificates are working.

PHP is configured and running, but won't load and enable the PHP OCI8 library and constituent functions.

I have added "extension=php_oci8_12c.dll" line to the php.ini file.

The extension directory is configured correctly.

"phpinfo()" shows that the correct php.ini file is being loaded, and that the extension directory is set to where the php_oci8_12c.dll file is located.

Even if I load set the "extension=" directive in php.ini to the full path of the file, it won't load.

"phpinfo()" does NOT show the OCI8 block that it is supposed to show if the OCI8 library is loaded.

I have added the Oracle Instant Client installation path to the system PATH envvar.

I have tried to use the php_oci8.dll and php_oci8_11g.dll files as well, to no effect.

I have even tried setting PHP up to run as a fastcgi object. Same problem.

I have done everything that all of the documentation I can find says I need to do in order to get php configured with the oci8 library, but still I get:

PHP Fatal Error: Call to undefined function oci_connect() in [...]

Anyone have any thoughts?
 
Last edited:
Nevermind, I fixed it.

Turns out the version of PHP I had was thread-safe, and I was trying to use the non-thread-safe PECL OCI8 library. So I replaced it with the thread-safe version, and it connects properly. It would have been awesome if there had been some error reporting from PHP/Apache on this, but no.
 
Status
Not open for further replies.
Back
Top