note 42462 added to function.ora-error

From: Date: Mon, 17 May 2004 20:56:46 +0000
Subject: note 42462 added to function.ora-error
Groups: php.notes 
Request: Send a blank email to php-notes+get-69739@lists.php.net to get a copy of this message
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 ---- Manual Page -- http://www.php.net/manual/en/function.ora-error.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+42462 Delete -- http://master.php.net/manage/user-notes.php?action=delete+42462&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+42462&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#69739) next »