Re: Bug #3552: Ora_Error causes fake "not connected to Oracle" error to remote database
| From: | thies at digicol dot de | Date: | Tue, 22 Feb 2000 14:17:10 +0000 |
| Subject: | Re: Bug #3552: Ora_Error causes fake "not connected to Oracle" error to remote database | ||
| References: | 1 | Groups: | php.dev |
| Request: | Send a blank email to php-dev+get-15788@lists.php.net to get a copy of this message | ||
On Mon, Feb 21, 2000 at 07:24:44PM -0000, joop.vriend@ddnh.nl wrote:
> From: joop.vriend@ddnh.nl
> Operating system: Linux 2.2.10 SMP
> PHP version: 3.0.12
> PHP Bug Type: Oracle related
> Bug description: Ora_Error causes fake "not connected to Oracle" error to remote
> database
>
> We use the following function (in a "library" file we include with PHP at the top of
> a page) to parse and execute a query on an Oracle-database:
>
> function ParseExec($conn, $curs, $query) {
> if (! $conn)
> ErrorClose("<BR><BR><B>ERROR:</B> GEEN VERBINDING!!!");
>
> if (ora_Parse($curs, $query, 0) == -1)
> ErrorClose("<BR><BR><B>ERROR:</B> SQL parse error");
>
> // Bewaar de evt. parse error
> $orcl_error = ora_Error($curs);
>
> if (! ora_Exec($curs)) {
> if (strstr($orcl_error, "ORA-00000")) $orcl_error = ora_Error($curs);
> $fout = "<BR><BR><B>ERROR:</B> Execute error\n\n";
> $fout .= "<BR><BR><B>QUERY:</B> " . $query .
> "\n\n";
> $fout .= "<BR><BR><B>ORACLE ERROR:</B> " . $orcl_error .
> "\n\n";
> if ($conn && ! ora_RollBack($conn))
> $fout .= "<BR><BR><B>ERROR:</B> Could not rollback\n\n";
> ErrorClose($fout);
> }
> }
>
> If we use this function with a database on the same machine (Ora_Logon without TNSNAME), there
> is no problem. If we are connected to a remote database (Ora_Logon with a TNSNAME) the Ora_Error
> statement -- $orcl_error = ora_Error($curs); -- causes the Ora_Exec statement to give the following
> error message (mind the OPARSE !):
>
> ORA-03114: not connected to ORACLE -- while processing OCI function OPARSE
>
> If we comment out the Ora_Error statement, the problem does not occur.
>
> I have not checked whether this problem also exists with PHP 3.0.14. If it does not, sorry for
> the inconvenience and I would appreciate it very much if you would tell me.
sorry, i do not understand your problem? - what are you
expecting vw. what you're getting?
>
> This is our configure line:
>
> ./configure --with-apache=/usr/src/apache --with-gd=/usr/src/gd
> --with-oracle=/u01/app/oracle/product/8.0.5 --with-pgsql --with-dbase=yes
> --with-config-file-path=/usr/local/apache/conf --enable-debug=no --enable-track-vars=yes
> --enable-magic-quotes=yes
>
>
> Joop Vriend
> DD&H Internet Vision
> Enschede, The Netherlands
>
> Keep up the good work!
>
>
>
> --
> 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
>
--
Thies C. Arntzen "One Big-Mac, Small Fries and a Coke!"
Digital Collections Phone +49 40 235350 Fax +49 40 23535180
Hammerbrookstr. 93 20097 Hamburg / Germany