note 42462 deleted from function.ora-error by danbrown

From: Date: Fri, 26 Sep 2008 16:44:39 +0000
Subject: note 42462 deleted from function.ora-error by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-144815@lists.php.net to get a copy of this message
Note Submitter: rob at towner dot cx ---- You can use ora_error() to output the reason for a failed ora_logon() connection attempt. To do this, call ora_error() without any parameters. This works for php versions >= 4.0.2. <?php $conn = @ora_logon("user@wrongTNS", "pass"); if (!$conn) { echo "Unable to connect to the database.<BR>\n"; echo ora_error(), "\n"; } ?> This will output: Unable to connect to the database.<BR> ORA-12154: TNS:could not resolve service name

« previous php.notes (#144815) next »