Re: Bug #10552: Exit() function never work when an Oracle error occures

From: Date: Sun, 29 Apr 2001 14:58:38 +0000
Subject: Re: Bug #10552: Exit() function never work when an Oracle error occures
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-52912@lists.php.net to get a copy of this message
This may be fixed in 4.0.5 <azhdin@netcourrier.com> wrote in message news:20010429142529.28137.qmail@php2.chek.com... > From: azhdin@netcourrier.com > Operating system: Windows 2000 > PHP version: 4.0.4pl1 > PHP Bug Type: OCI8 related > Bug description: Exit() function never work when an Oracle error occures > > Here's my script where the problem occures. > You can see that there is a SQL statement error in $lvRequete because there a problem when an Oracle Error occures. > The first execution goes well, but since the second execution i've go the waiting cursor on my web page and the PHP module still running. > > <?php > function MySQLStatement() > { > global $conn_id; > > $conn_id = OCILogon("myname", "mypass", "ORACLE"); > > if ($conn_id == false) > { > echo 'OWS-20004 : Oracle error. Unable to connect to destination !'; > exit; > } > $lvRequete = "*Select sysdate from dual"; > if ($SQLStatement = OCIParse($conn_id,$lvRequete)) > { > if (OCIExecute($SQLStatement)==0) > { > OCILogOff($conn_id); > echo 'OWS-20005 : Oracle error. SQL Syntax error !'; > exit; > } > > } > else > { > echo 'OWS-20006 : Oracle error. Parse SQL error Level 0 !'; > exit; > } > if(OCIFetch($SQLStatement) != 0) > { > $lvColumnName = OCIResult($SQLStatement,1); > > return $lvColumnName; > } > else > { > OCILogOff($conn_id); > return "Fetch Error"; > } > OCIFreeStatement($SQLStatement); > } > > $MyValue = MySQLStatement(); > echo $MyValue; > ?> > > > -- > Edit Bug report at: http://bugs.php.net/?id=10552&edit=1 > > > > -- > PHP Development Mailing List <http://www.php.net/> > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.dev (#52912) next »