For what it's worth, here is the script I've been using to hook up to 
Oracle (specific for my system removed, of course...):

putenv("ORACLE_HOME=[location of TNS file on server]");
$db = ocilogon("[user]","[password]","[sid]");
echo "Oracle connection status: ";
if($db) {
         echo "<b>Success</B>" ;
} else {
         echo "Failed connecting to oracle.  Exiting program.";

The key proved to be the two putenv statements at the beginning.

At 05:51 PM 1/17/01 +0100, R Maier wrote:
>I compiled php4 with oci8 support and once the communication was
>Now I allways get the result ORA-12154: could not resolve servicename.
>I tried tnsping and sqlplus with the listener tracelevel switched to
>With sqlplus I get messages into the tracefile and a connection.
>tnsping can also ping.
>There must have been a change in the tnsnames.ora or is there something
>that has to be set for php4 ?
>thx for vou help.
>PHP Database Mailing List (
>To unsubscribe, e-mail: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]

PHP Database Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to