Installing ORACLE drivers with PHP should be easy, but in reality it can be quite difficult.
Our Student Information System (EBS) runs on ORACLE and I needed Moodle to talk directly to it using ODBC for ORACLE. In theory, all one needs to do is enable oci.dll in PHP.ini and make sure the extension resides in the Ext folder…but that would be too easy.
Here is how to make it work.
1) Copy oci.dll and ociw32.dll to your php/bin folder
2) Copy php_oci8.dll to php/ext folder and to your windows/system32 folder and to your windows directory
3) Check that your Oracle client is referenced in your Windows system path. (click my computer > properties > advanced > variables > paths) Make sure msvcr71.dll is in the system32 folder. Oracle needs this function properly!
4) Uncomment php_oci8.dll from php.ini
5) Restart Apache
6) Check your php info
7) You should see the oci8 module listed
Now the tricky part, When you run phpinfo you will see oci8.dll listed . But when you run php.exe from dos you may see a message saying the oci.dll is not loaded. If this is the case make sure you have copied oci.dll and ociw32.dll to the php folder.
If it still doesn’t work download the latest ones from the Oracle Client 10 basic and copy the new ones to your Oracle client folder and to the php/bin folder. This is how I got it to work. But I realised it occasionally crashed Apache, then i found out that php5.2.1 doesn’t work as well as 5.2.6 when using oci8.
Also try and use version 10 of the Oracle client, it”s much more stable than 9.