From:             Tomasz dot Fryc at bph dot pl
Operating system: Windows 2003 Server
PHP version:      5.0.3
PHP Bug Type:     Oracle related
Bug description:  "ORA-01001: invalid cursor" after invoking oci-fetch-all 
function

Description:
------------
Database (Oracle 9.2.0.5.0 on HP-UX 11.11) connection is opened with
oci_new_connect function. A statment is prepared with oci_parse and a
cursor is created with oci_new_cursor. After binding the statement to the
cursor (oci_bind_by_name), the statement and the cursor are executed
(oci_execute). The problem occures while invoking oci_fetch_all function,
which sometimes doesn't give expected number of rows (not all of the rows
are fetched) and causes "ORA-01001: invalid cursor" warning.

Reproduce code:
---------------
$sql="begin EXM.MY_PKG.getrows('param1','param2'); end;"
$conn=oci_new_connect("somebody","something")
$curs=oci_new_cursor($conn)
$stmt=oci_parse($conn,$sql)
oci_bind_by_name($stmt,"data",$curs,-1,OCI_B_CURSOR)
oci_execute($stmt,OCI_DEFAULT)
oci_execute($curs,OCI_DEFAULT)
$nrows=oci_fetch_all($curs,$results)
oci_free_statement($curs)
oci_free_statement($curs)

Expected result:
----------------
Every function is correctly executed except oci_fetch_all, which sometimes
doesn't give all of the rows.


-- 
Edit bug report at http://bugs.php.net/?id=31693&edit=1
-- 
Try a CVS snapshot (php4):   http://bugs.php.net/fix.php?id=31693&r=trysnapshot4
Try a CVS snapshot (php5.0): 
http://bugs.php.net/fix.php?id=31693&r=trysnapshot50
Try a CVS snapshot (php5.1): 
http://bugs.php.net/fix.php?id=31693&r=trysnapshot51
Fixed in CVS:                http://bugs.php.net/fix.php?id=31693&r=fixedcvs
Fixed in release:            http://bugs.php.net/fix.php?id=31693&r=alreadyfixed
Need backtrace:              http://bugs.php.net/fix.php?id=31693&r=needtrace
Need Reproduce Script:       http://bugs.php.net/fix.php?id=31693&r=needscript
Try newer version:           http://bugs.php.net/fix.php?id=31693&r=oldversion
Not developer issue:         http://bugs.php.net/fix.php?id=31693&r=support
Expected behavior:           http://bugs.php.net/fix.php?id=31693&r=notwrong
Not enough info:             
http://bugs.php.net/fix.php?id=31693&r=notenoughinfo
Submitted twice:             
http://bugs.php.net/fix.php?id=31693&r=submittedtwice
register_globals:            http://bugs.php.net/fix.php?id=31693&r=globals
PHP 3 support discontinued:  http://bugs.php.net/fix.php?id=31693&r=php3
Daylight Savings:            http://bugs.php.net/fix.php?id=31693&r=dst
IIS Stability:               http://bugs.php.net/fix.php?id=31693&r=isapi
Install GNU Sed:             http://bugs.php.net/fix.php?id=31693&r=gnused
Floating point limitations:  http://bugs.php.net/fix.php?id=31693&r=float
No Zend Extensions:          http://bugs.php.net/fix.php?id=31693&r=nozend
MySQL Configuration Error:   http://bugs.php.net/fix.php?id=31693&r=mysqlcfg

Reply via email to