From: biton at compuserve dot com Operating system: Vista / Linux PHP version: 5.2.9 PHP Bug Type: OCI8 related Bug description: New Collection not working on Packages
Description: ------------ oci_new_collection() works fine on a 'TYPE' created by a user. However, if the 'TYPE' is created as part of a package, oci_new_collection() appears not to find it. <?php $c = oci_pconnect(...); // Works. sql = 'create or replace type email_array as varray(200) of varchar2(20); $s = oci_parse($c, $sql); oci_execute($s, $sql); $collec = oci_new_collection($c, 'EMAIL_ARRAY'); // Fails sql = 'create or replace type package.email_array as varray(200) of varchar2(20); $s = oci_parse($c, $sql); oci_execute($s, $sql); $collec = oci_new_collection($c, 'PACKAGE.EMAIL_ARRAY'); ?> If the TYPE is created as part of the package (and not through PHP), this also fails. Any combination of user/package/type_name appears not to work. The workaround is to create a TYPE in teh user global area of the same type as that in the package, and use that in a wrapper PL/SQL block. While this works... it kindda defeats the point behind packages. Reproduce code: --------------- --- >From manual page: function.oci-new-collection --- -- Edit bug report at http://bugs.php.net/?id=47557&edit=1 -- Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=47557&r=trysnapshot52 Try a CVS snapshot (PHP 5.3): http://bugs.php.net/fix.php?id=47557&r=trysnapshot53 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=47557&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=47557&r=fixedcvs Fixed in CVS and need be documented: http://bugs.php.net/fix.php?id=47557&r=needdocs Fixed in release: http://bugs.php.net/fix.php?id=47557&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=47557&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=47557&r=needscript Try newer version: http://bugs.php.net/fix.php?id=47557&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=47557&r=support Expected behavior: http://bugs.php.net/fix.php?id=47557&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=47557&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=47557&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=47557&r=globals PHP 4 support discontinued: http://bugs.php.net/fix.php?id=47557&r=php4 Daylight Savings: http://bugs.php.net/fix.php?id=47557&r=dst IIS Stability: http://bugs.php.net/fix.php?id=47557&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=47557&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=47557&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=47557&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=47557&r=mysqlcfg