PHP4 Oracle TNS problem

admin

Administrator
Staff member
Hello everyone!
I just installed PHP4 on my WinNT box with Apache and I'm trying to connect to Oracle. The error message I get is as follows:

Warning: _oci_open_server: ORA-12154: TNS:could not resolve service name in c:\Files\htdocs/directory_add/add.php on line 41

I've seen that a lot of people are having this problem and I have found just this one reply to maybe solve the problem:

please set all oracle-relates environment variables *before* you start your apache
process! do not use SetEnv in httpd.conf not PutEnv() in your php-script to set eny of those!

However, I don't have a clue where to set this enviroment variable. I've gone to the Enviroment variable in Win NT by right clicking on My Computer and going to properties etc. and actually creating a new variable ORACLE_SID=C:\path-to-tnsname.ora but that still doesn't work.

Any suggestions or how I can get this to work?

Thanks,
Jay Paulson
 
Back
Top