From: tomy at envox dot hr
Operating system: Suse 8.2
PHP version: 4CVS-2004-01-13 (stable)
PHP Bug Type: OCI8 related
Bug description: ocinewcollection fails with Oracle 9.2
Description:
------------
ocinewcollection returns false and produces a warning, output with oci
debug enabled follows in actual result.
I have checked in source and using oci_debug that OCIInitialize is called
using OCI_DEFAULT | OCI_OBJECT so I do not understand why this error
happens.
PHP is compiled using this configure:
"
'./configure' '--enable-sigchild' '--disable-static'
'--enable-track-vars'
'--enable-trans-sid' '--enable-sockets' '--with-mysql'
'--with-xml'
'--disable-rpath' '--disable-pic' '--disable-posix'
'--with-zlib'
'--without-pear' '--without-aspell' '--disable-dbase'
'--disable-dba'
'--without-mhash' '--without-gmp' '--with-gnu-ld'
'--disable-bcmath'
'--without-cdb' '--without-db3' '--without-db2'
'--without-gdbm'
'--without-ndbm' '--without-dbm' '--without-dom'
'--enable-mbstring'
'--enable-mbstr-enc-trans' '--with-recode' '--with-gd'
'--enable-shmop'
'--enable-sysvsem' '--with-xmlrpc' '--with-oci8'
'--with-mcrypt'
'--with-apxs' "
LOCAL_ID_ARRAY is defined as:
"
CREATE OR REPLACE TYPE local_id_array AS TABLE OF NUMBER(11);
"
Reproduce code:
---------------
$_db_tns =
"(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.3.41)(PORT=1521)))(CONNECT_DATA=(SID=pirana)(SERVER=DEDICATED)))";
$_db_user = "system";
$_db_pwd = "pirana";
ociinternaldebug(1);
$db = ocinlogon($_db_user, $_db_pwd, $_db_tns);
$arr = ocinewcollection($db, 'LOCAL_ID_ARRAY');
if ($arr === false) echo "Collection failed<br>";
Expected result:
----------------
I expect only oci debug data to be written.
Actual result:
--------------
$arr should be OCI-Collection however it is false.
Actual output is:
"
OCIDebug: _oci_open_server new conn=0
dname=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.3.41)(PORT=1521)))(CONNECT_DATA=(SID=pirana)(SERVER=DEDICATED)))
OCIDebug: _oci_open_session new sess=5 user=system
OCIDebug: oci_do_connect: id=6
Warning: ocinewcollection(): OCITypeByName: ORA-21301: not initialized in
object mode in /srv/www/htdocs/envox/info2.php on line 18
Collection failed
OCIDebug: START php_rshutdown_oci
OCIDebug: END php_rshutdown_oci
OCIDebug: START _oci_coll_list_dtor: 7
OCIDebug: START _oci_conn_list_dtor: id=6
OCIDebug: nothing to do..
OCIDebug: START _oci_close_session: logging-off sess=5
OCIDebug: END _oci_conn_list_dtor: id=6
OCIDebug: END _oci_coll_list_dtor: 7
OCIDebug: START _oci_close_server: detaching conn=4
dbname=(DESCRIPTION=(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=192.168.3.41)(PORT=1521)))(CONNECT_DATA=(SID=pirana)(SERVER=DEDICATED)))
"
--
Edit bug report at http://bugs.php.net/?id=26892&edit=1
--
Try a CVS snapshot (php4): http://bugs.php.net/fix.php?id=26892&r=trysnapshot4
Try a CVS snapshot (php5): http://bugs.php.net/fix.php?id=26892&r=trysnapshot5
Fixed in CVS: http://bugs.php.net/fix.php?id=26892&r=fixedcvs
Fixed in release: http://bugs.php.net/fix.php?id=26892&r=alreadyfixed
Need backtrace: http://bugs.php.net/fix.php?id=26892&r=needtrace
Need Reproduce Script: http://bugs.php.net/fix.php?id=26892&r=needscript
Try newer version: http://bugs.php.net/fix.php?id=26892&r=oldversion
Not developer issue: http://bugs.php.net/fix.php?id=26892&r=support
Expected behavior: http://bugs.php.net/fix.php?id=26892&r=notwrong
Not enough info: http://bugs.php.net/fix.php?id=26892&r=notenoughinfo
Submitted twice: http://bugs.php.net/fix.php?id=26892&r=submittedtwice
register_globals: http://bugs.php.net/fix.php?id=26892&r=globals
PHP 3 support discontinued: http://bugs.php.net/fix.php?id=26892&r=php3
Daylight Savings: http://bugs.php.net/fix.php?id=26892&r=dst
IIS Stability: http://bugs.php.net/fix.php?id=26892&r=isapi
Install GNU Sed: http://bugs.php.net/fix.php?id=26892&r=gnused
Floating point limitations: http://bugs.php.net/fix.php?id=26892&r=float