From: surajsrinivasan at hsbc dot co dot in Operating system: Windows PHP version: 5.2.9 PHP Bug Type: Oracle related Bug description: While using oci_execute on a stored proc and sequence goes above 999
Description: ------------ I execute a stored procedure (code listed below). The stored proc does several things, one of which is to fetch the next value in a sequence. It works fine except when the sequence value crossess 999. I tested for all cases by resetting the sequence initial value to 1, 2000, 50000. The stored procedure works perfectly. No issues. The PHP works fine only when the output paremeter (which is the sequence value) is initialised to a value > 1000 Has anyone come across this before? The sequence has no issues as it has a max limit > 99999999999. I tried to return the sequence value as both number and varchar2, but both have the same issue. Reproduce code: --------------- This works for sequence value <1000 but not >= 1000: $seqid = ""; $sSQL = "BEGIN sp_name(:seqid); END;"; $stmt = oci_parse($conn , $sSQL); ... oci_execute($stmt, OCI_DEFAULT); -> If ret var is > 999, gives "<b>Warning</b>: oci_execute() [<a href='function.oci-execute'>function.oci-execute</a>]: ORA-06502: PL/SQL: numeric or value error: character string buffer too small" This works for all cases: $seqid = "2000"; $sSQL = "BEGIN sp_name(:seqid); END;"; $stmt = oci_parse($conn , $sSQL); ... oci_execute($stmt, OCI_DEFAULT); Expected result: ---------------- Should work fine without needing to initialise $seqid Actual result: -------------- Have to initialise $seqid to a value > 1000 -- Edit bug report at http://bugs.php.net/?id=48328&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=48328&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=48328&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=48328&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=48328&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=48328&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=48328&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=48328&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=48328&r=needscript Try newer version: http://bugs.php.net/fix.php?id=48328&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=48328&r=support Expected behavior: http://bugs.php.net/fix.php?id=48328&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=48328&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=48328&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=48328&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=48328&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=48328&r=dst IIS Stability: http://bugs.php.net/fix.php?id=48328&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=48328&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=48328&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=48328&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=48328&r=mysqlcfg