PHP5 and Oracle

Questions about the MySQL, PostgreSQL, and most other databases, as well as using it with PHP can be asked here.

Moderator: General Moderators

Post Reply
fangorn
Forum Commoner
Posts: 41
Joined: Fri May 21, 2004 9:04 am

PHP5 and Oracle

Post 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?
fangorn
Forum Commoner
Posts: 41
Joined: Fri May 21, 2004 9:04 am

Post 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.
TheOracle
Forum Commoner
Posts: 64
Joined: Mon Nov 22, 2004 4:56 am
Location: Bedford, UK

Post 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.
Post Reply