I am using a Windows 7 machine, and have installed WAMP (www.wampserver.com/en/
) on it.
I can connect to Oracle through SQL*Plus and SQL Developer. I have also created a test PHP script to connect to Oracle, which works when using the PHP command line. However, when I try running the same PHP script through Apache (i.e. typing 'http://localhost/oracletest.php'
into the browser) it will not work, resulting in a "ORA-12154: TNS:could not resolve the connect identifier specified" error.
I have made sure that Windows firewall allows apache, wampservermanager.exe and php.exe. I have enabled OCI8 PHP extension, installed an oracle client, made sure the path to the client is in the windows environment variable path.
I would be very grateful to anyone with any idea as to what is causing this!