|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2005-03-31 16:13 UTC] php-bugs at lists dot php dot net
|
|||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 02:00:01 2025 UTC |
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. 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!