Page 1 of 1

PHP5 and Oracle

Posted: Wed Jun 15, 2005 10:41 am
by fangorn
I am running Windows XP, PHP 5.0.4 and Apache 2.0.54. PHP is working just fine. I now need to load the module php_oci8.dll to use Oracle.

I've changed my php.ini extension_dir line to read:

extension_dir = "C:\PHP5\ext"

Then I uncommented the extension=php_oci8.dll line in the php.ini file.

Then I restarted Apache.

Now I'm getting an error when I load php pages:
PHP Startup: Unable to load dynamic library 'c:\PHP5\ext\php_oci8.dll' - The specified module could not be found.

When I look for that dll, it is located in c:\PHP5\ext\php_oci8.dll. It's in the right spot. I've even dropped it into the C:\windows and c:\windows\system32 directories and no luck.

This worked great with PHP 4. Anyone know how to fix this?

Posted: Thu Jun 16, 2005 8:53 am
by fangorn
So then I loaded ODP for .NET which the Oracle documentation says will load the Oracle client. I started the Oracle client and verified that I could connect successfully to my remote Oracle database, but PHP still wouldn't load the oci8 dll. So then I loaded the full blown version of Oracle and now PHP works like a charm. My old reports are getting data from my remote Oracle database.

So this means that the error message I was getting was misleading. Furthermore, does this actually mean that Oracle must be loaded on the machine where PHP is running? Surely not, but it seems that way. I must've had some Oracle client dll's in the wrong place or hadn't set an environment variable or something.

Posted: Wed Jul 13, 2005 1:38 pm
by TheOracle
Hi fanghorn,

You would need the Oracle software installed on your DB Server, and if that is not the same as your webserver, then you would need an Oracle client (administrator) installed on the webserver.