|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2002-09-12 04:58 UTC] thies@php.net
[2002-09-12 04:58 UTC] thies@php.net
[2002-09-12 09:20 UTC] dante dot lorenso at atmosenergy dot com
[2002-09-13 11:59 UTC] thies@php.net
[2002-10-08 21:43 UTC] sniper@php.net
[2003-11-25 05:24 UTC] p dot m at iol dot it
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Sun Oct 26 06:00:02 2025 UTC |
I use the following code to loop through an array of SIDs for Oracle...and attempt to change the password for a given username on each Oracle database... ================================================== foreach ($names as $SID => $CONN_SID) { // make a connection $dbconn = @OCINLogon($username, $old_password, $SID); if (! $dbconn) { $this->dumpError("ORAPASS[OCILogon]"); continue; } // parse the SQL statement... $sql_statement = @OCIParse($dbconn, $sql); if (! $sql_statement) { error_log("ORAPASS[OCIParse]"); @OCILogOff($dbconn); continue; } // execute sql query $exec_result = @OCIExecute($sql_statement); if (! $exec_result) { error_log("ORAPASS[OCIExecute]"); @OCILogOff($dbconn); continue; } // disconnect... @OCILogOff($dbconn); unset($dbconn); // show the results... $text .= sprintf ('Success: %s<br>', $SID); } ================================================== However, for some reason if the SID I connect to results in the following OCIError: Failed: SID1 (ORA-12541: TNS:no listener) Then, all subsequent OCINLogon or OCILogon calls will result in this error message: Failed: SID2 (ORA-12154: TNS:could not resolve service name) If I restart Apache/PHP and connect to SID2, it will work, but if I connect to any SID after getting the 'ORA-12541: TNS:no listener' error, my Oracle connections all fail. --Dante