Okay everyone!! I got it up and working FINALLY so here's what I did step by step, but first here's my confiuration of everything so you all will know what I was dealing with.
WinNT
Apache 3.1.12
PHP4.0.3pl1
Oracle client 8.1.6.0.0
I was running Oracle client 8.0.5 and uninstalled it and put 8.1.6 on. Anyway, here's what I did.
Installed 8.1.6 custom install for the client and the Oracle Utilities for NT. I placed this install in C:\Oracle
Next I installed Apache 3.1.12 in C:\apache (to get apache up and running correctly i just follow this tutorial <http://www.thickbook.com/extra/php_apachephp4_win.phtml> it's really good on how to install apache with php4 and it only took me like 5 minutes to do).
After the install I installed PHP4.0.3pl1 in C:\php4 (to get php4 up and running correctly as a cgi program i just follow this tutorial <http://www.thickbook.com/extra/php_apachephp4_win.phtml> it's really good on how to install php4 and it only took me like 5 minutes to do).
I next went into the php.ini file and uncommented the php_oci.dll and the php_oracle.dll files.
Then I next went into apache's http.conf file and where it says:
Section 1: Global Environment
#
The directives in this section affect the overall operation of Apache,
such as the number of concurrent requests it can handle or where it
can find its configuration files.
#
I set these enviroment variables like so:
SetEnv TNS_ADMIN /Oracle/Ora81/Network/Admin
SetEnv ORACLE_HOME /Oracle/Ora81
For the tnsnames.ora file you have to set the TNS_ADMIN variable to where that is located on your local computer which you are running PHP4 on (in my case I installed the oracle client to C:\Oracle so I had to set the TNS_ADMIN to C:\Oracle\Ora81\Network\Admin. If you install the oracle client somewhere else then it would be my guess you would set the TNS_ADMIN variable to C:\TheDirOfOracle\Ora81\Network\Admin).
For the ORACLE_HOME variable you have to set it to where you install the Oracle client and in my case that was C:\Oracle (I had to add the Ora81 to the end of that (C:\Oracle\Ora81) in order to point it to the right spot so my guess would be if you installed the oracle client into a different directory you would set the ORACLE_HOME variable to C:\TheDirOfOracle\Ora81).
After I saved the http.conf file I went to "Services" which is in the control panel and just restarted Apache there.
I then took a look at my phpinfo file that I had made to see if the TNS_ADMIN and the ORACLE_HOME variables were set and they were.
Finally, I wrote a small program to connect to my database and it worked!
$db = "nameofdb";
$connID = OCILogon("user", "pass", $db);
if ($connID > 0) {
echo "Connected to Oracle!";
}
else {
echo "Connection Failed!";
}
I hope this helps everyone out! Let me know if this works for you all!
Jay Paulson