note 37179 added to function.ora-logon

From: Date: Wed, 05 Nov 2003 23:52:07 +0000
Subject: note 37179 added to function.ora-logon
Groups: php.notes 
Request: Send a blank email to php-notes+get-59966@lists.php.net to get a copy of this message
I also goy the ORA-1245 error using ora_logon, but setting the ORACLE_HOME var so it showed up in both the Apache Environment and Environment sections in phpinfo didn't help the situation. The full error was "Warning: Oracle: Connection Failed: ORA-12545: Connect failed because target host or object does not exist in /path/to/script on line xx." Turns out I had the oracle client installed (which is required) and I had the environment correct (which is required), but I didn't have a local tnsnames.ora file setup, so the connection couldn't find the correct binaries to connect to oracle. Creating the tnsnames.ora file on the local server (db server is remote) and using the proper syntax of "ora_logon("user@tnsentry", "password");" worked for me. Note: ORACLE_HOME and ORACLE_SID were set in the script using putenv. ---- Manual Page -- http://www.php.net/manual/en/function.ora-logon.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+37179 Delete -- http://master.php.net/manage/user-notes.php?action=delete+37179&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+37179&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#59966) next »