Problems with oci8.php

From: Date: Fri, 16 Mar 2001 10:05:49 +0000
Subject: Problems with oci8.php
Groups: php.pear.dev 
Request: Send a blank email to pear-dev+get-29@lists.php.net to get a copy of this message
Hi, I posted something very similar to this a few days ago. At the time Thomas Fromm replied that prepending all the OCI functions with '@' would probably fix the problem. Since then I can see that the latest CVS has this 'fix' in place. However this is not a solution - at least for me. My original post neglected to mention that the error messages were repeated in an infinite loop until the script eventually times out. The '@' just means one doesn't see them - the script still crashes. My 'solution' is to comment out: if (!$row) { return $this->raiseError(); } ...from the fetchRow function. ================================== This bit of code: if (DB::isError ($result = $db_con -> query ($sql))) handle_db_error ($result); else while ($resultRow = $result -> fetchRow()) { echo $resultRow[0] . '<BR>'; } Returns these Oracle errors: Warning: OCIFetchInto: ORA-01002: fetch out of sequence in DB/oci8.php on line 172 Warning: OCIStmtExecute: ORA-00936: missing expression in DB/oci8.php on line 138 But the equivalent native php functions: if (!$result = OCIParse ($db_con, $sql)) handle_db_error ($result); else { OCIExecute ($result); while (OCIFetchInto ($result, $resultRow)) { echo $resultRow[0] . '<BR>'; } } ...work fine. ================================== The only difference I can see between the two bits of code is that there is an explicit 'commit' happening in the native PHP version. However, I'm assuming that an automatic commit is taking place with the PEAR version? (latest PEAR classes from CVS, Oracle 8.1.6 Linux, php 4.04pl1) -- All the best, Paul Rees Web Application Programmer/Developer surfEU.com GmbH

« previous php.pear.dev (#29) next »