note 9333 deleted from Error Control Operators by jimw

From: Date: Tue, 23 Jan 2001 02:53:09 +0000
Subject: note 9333 deleted from Error Control Operators by jimw
Groups: php.notes 
Request: Send a blank email to php-notes+get-10168@lists.php.net to get a copy of this message
@ sign saved me! I have used OCILogon() function to get a connection with a remote Oracle 8i server. If the database is donw for some reason, then I don't want lines of nasty messages generated directly by Oracle to pop up on my Web page. The following code is tested to be working on a Solaris box, where Apache 1.3.12 and PHP 4.0.3 are installed (Oracle server is on a True 64 box): if (!($conn = @OCILogon($username, $password,$sid))) { /* for whatever reason the connection fails, write out your own message here. */ echo("<p>Database connection failed. Please verify your username and password, then reconnect. If problem persists, please contact your Webmaster for assistance.</P>"); } else { /* if you're lucky, you can get a connection, then you should resume normal operation, such as record fetching, deploying etc. */ }

« previous php.notes (#10168) next »