#26892 [Opn]: ocinewcollection fails with Oracle 9.2
ID: 26892 User updated by: tomy at envox dot hr Reported By: tomy at envox dot hr Status: Open Bug Type: OCI8 related Operating System: Suse 8.2 PHP Version: 4CVS-2004-01-13 (stable) New Comment: The error seems to be in configure script It says after checking for OCICollAssign: " if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then echo "$ac_t""yes" 1>&6 LDFLAGS=$save_old_LDFLAGS ext_shared=$save_ext_shared cat >> confdefs.h <<\EOF #define HAVE_OCI8_COLLECTIONS 1 EOF " And after examining temporary confdefs.h i have in it: " #define HAVE_OCI8_ATTR_STATEMENT 1 #define HAVE_OCI_9_2 1 #define HAVE_OCI8_TEMP_LOB 1 #define HAVE_OCI8_COLLECTIONS 1 #define HAVE_OCI8 1 " The problem is obvious, in configure you define HAVE_OCI8_COLLECTIONS and in oci8.c you use PHP_OCI8_HAVE_COLLECTIONS (actually in oci8.c you use PHP_OCI8_HAVE_COLLECTIONS in several places and HAVE_OCI8_COLLECTIONS i one place). HAVE_OCI8_COLLECTIONS is used in all other files except oci8.c (configure, config.m4, one .h.in file, etc...) I do not know how you compiled and tested with this configure and this oci8.c since defines are obviously different. After changing all PHP_OCI8_HAVE_COLLECTIONS to HAVE_OCI8_COLLECTIONS in oci8.c I compiled succesfully and phpinfo() says: " oci8 OCI8 Support enabled Revision $Revision: 1.232 $ Active Persistent Links 0 Active Links 0 Oracle Version 9.2 Compile-time ORACLE_HOME /opt/oracle/product/9ir2 Libraries Used no value Temporary Lob support enabled Collections support enabled " However, the original bug described in original bug report remains!!! Previous Comments: [2004-01-14 07:46:41] tomy at envox dot hr config.log says: " ... configure:54726: checking for ncurses support configure:55705: checking for Oracle-OCI8 support configure:55750: checking Oracle Install-Dir configure:56045: checking Oracle version configure:56697: checking for OCIEnvNlsCreate in -lclntsh configure:56716: gcc -o conftest -g -O2 -Wl,-rpath,/opt/oracle/product/9ir2/lib -L/opt/oracle/product/9ir2/lib -Wl,-rpath,/opt/oracle/product/9ir2/lib -L/opt/oracle/product/9ir2/lib conftest.c -lclntsh -lmysqlclient -lmcrypt -lltdl -lpng -lz -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm -ldl -lm -lnsl -lclntsh 1>&5 configure:56816: checking for OCINlsCharSetNameToId in -lclntsh configure:56835: gcc -o conftest -g -O2 -Wl,-rpath,/opt/oracle/product/9ir2/lib -L/opt/oracle/product/9ir2/lib -Wl,-rpath,/opt/oracle/product/9ir2/lib -L/opt/oracle/product/9ir2/lib conftest.c -lclntsh -lmysqlclient -lmcrypt -lltdl -lpng -lz -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm -ldl -lm -lnsl -lclntsh 1>&5 configure:56971: checking for OCILobIsTemporary in -lclntsh configure:56990: gcc -o conftest -g -O2 -Wl,-rpath,/opt/oracle/product/9ir2/lib -L/opt/oracle/product/9ir2/lib -Wl,-rpath,/opt/oracle/product/9ir2/lib -L/opt/oracle/product/9ir2/lib conftest.c -lclntsh -lmysqlclient -lmcrypt -lltdl -lpng -lz -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm -ldl -lm -lnsl -lclntsh 1>&5 configure:57266: checking for OCICollAssign in -lclntsh configure:57285: gcc -o conftest -g -O2 -Wl,-rpath,/opt/oracle/product/9ir2/lib -L/opt/oracle/product/9ir2/lib -Wl,-rpath,/opt/oracle/product/9ir2/lib -L/opt/oracle/product/9ir2/lib conftest.c -lclntsh -lmysqlclient -lmcrypt -lltdl -lpng -lz -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm -ldl -lm -lnsl -lclntsh 1>&5 configure:57575: checking for Adabas support ... " I do not know how it should look like Makefile created has: " ... MYSQL_INCLUDE = -I/usr/include/mysql OCI8_SHARED_LIBADD = OCI8_DIR = /opt/oracle/product/9ir2 OCI8_VERSION = 9.2 PCRE_SHARED_LIBADD = ... " I checked via simple #ifdef and oci_debug wether PHP_OCI8_HAVE_COLLECTIONS is defined and it was not. So I defined it myself but it produces same error as before. [2004-01-14 07:36:21] [EMAIL PROTECTED] PHP_OCI8_HAVE_COLLECTIONS should be defined in ./configure execution process. you should not change its value manually. ./configure checks if there are appropriate functions in oracle client and decides if there is possibility to turn on collection support. so, check ./config.log, plz. it seems, that there is no OCICollAssign function in your OCI version. that's rather strange, 'cause I've tested it successfully with Oracle 9.2.0.1 [2004-01-14 04:31:19] tomy at envox dot hr Downloaded http://snaps.php.net/php5-latest.tar.gz and compiled. Had to install mysql-develop packages and newer libxml2 packages (I had to "borrow these from Suse 9.0 since there are no libxml2-2.5.10 for Suse 8.2, only 2.5.3, hope this is ok). After compiling and instal
#26892 [Opn]: ocinewcollection fails with Oracle 9.2
ID: 26892 User updated by: tomy at envox dot hr Reported By: tomy at envox dot hr Status: Open Bug Type: OCI8 related Operating System: Suse 8.2 PHP Version: 4CVS-2004-01-13 (stable) New Comment: config.log says: " ... configure:54726: checking for ncurses support configure:55705: checking for Oracle-OCI8 support configure:55750: checking Oracle Install-Dir configure:56045: checking Oracle version configure:56697: checking for OCIEnvNlsCreate in -lclntsh configure:56716: gcc -o conftest -g -O2 -Wl,-rpath,/opt/oracle/product/9ir2/lib -L/opt/oracle/product/9ir2/lib -Wl,-rpath,/opt/oracle/product/9ir2/lib -L/opt/oracle/product/9ir2/lib conftest.c -lclntsh -lmysqlclient -lmcrypt -lltdl -lpng -lz -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm -ldl -lm -lnsl -lclntsh 1>&5 configure:56816: checking for OCINlsCharSetNameToId in -lclntsh configure:56835: gcc -o conftest -g -O2 -Wl,-rpath,/opt/oracle/product/9ir2/lib -L/opt/oracle/product/9ir2/lib -Wl,-rpath,/opt/oracle/product/9ir2/lib -L/opt/oracle/product/9ir2/lib conftest.c -lclntsh -lmysqlclient -lmcrypt -lltdl -lpng -lz -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm -ldl -lm -lnsl -lclntsh 1>&5 configure:56971: checking for OCILobIsTemporary in -lclntsh configure:56990: gcc -o conftest -g -O2 -Wl,-rpath,/opt/oracle/product/9ir2/lib -L/opt/oracle/product/9ir2/lib -Wl,-rpath,/opt/oracle/product/9ir2/lib -L/opt/oracle/product/9ir2/lib conftest.c -lclntsh -lmysqlclient -lmcrypt -lltdl -lpng -lz -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm -ldl -lm -lnsl -lclntsh 1>&5 configure:57266: checking for OCICollAssign in -lclntsh configure:57285: gcc -o conftest -g -O2 -Wl,-rpath,/opt/oracle/product/9ir2/lib -L/opt/oracle/product/9ir2/lib -Wl,-rpath,/opt/oracle/product/9ir2/lib -L/opt/oracle/product/9ir2/lib conftest.c -lclntsh -lmysqlclient -lmcrypt -lltdl -lpng -lz -lz -lresolv -lm -ldl -lnsl -lxml2 -lz -lm -lxml2 -lz -lm -ldl -lm -lnsl -lclntsh 1>&5 configure:57575: checking for Adabas support ... " I do not know how it should look like Makefile created has: " ... MYSQL_INCLUDE = -I/usr/include/mysql OCI8_SHARED_LIBADD = OCI8_DIR = /opt/oracle/product/9ir2 OCI8_VERSION = 9.2 PCRE_SHARED_LIBADD = ... " I checked via simple #ifdef and oci_debug wether PHP_OCI8_HAVE_COLLECTIONS is defined and it was not. So I defined it myself but it produces same error as before. Previous Comments: [2004-01-14 07:36:21] [EMAIL PROTECTED] PHP_OCI8_HAVE_COLLECTIONS should be defined in ./configure execution process. you should not change its value manually. ./configure checks if there are appropriate functions in oracle client and decides if there is possibility to turn on collection support. so, check ./config.log, plz. it seems, that there is no OCICollAssign function in your OCI version. that's rather strange, 'cause I've tested it successfully with Oracle 9.2.0.1 [2004-01-14 04:31:19] tomy at envox dot hr Downloaded http://snaps.php.net/php5-latest.tar.gz and compiled. Had to install mysql-develop packages and newer libxml2 packages (I had to "borrow these from Suse 9.0 since there are no libxml2-2.5.10 for Suse 8.2, only 2.5.3, hope this is ok). After compiling and installing I got an error saying that there is no function named ocinewcollection. Revised the source in ext/oci8/oci8.c and noticed that PHP_OCI8_HAVE_COLLECTIONS is note defined, so I defined it and compiled again. After that I got same error from the original bug report in slightly different from. The result of ocinewcollection is still false :(. Output follows " 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=3 user=system OCIDebug: oci_do_connect: id=4 Warning: ocinewcollection() [function.ocinewcollection]: OCITypeByName: ORA-21301: not initialized in object mode in /srv/www/htdocs/envox/info2.php on line 14 Collection failed OCIDebug: START php_rshutdown_oci OCIDebug: END php_rshutdown_oci OCIDebug: START _oci_coll_list_dtor: 5 OCIDebug: END _oci_coll_list_dtor: 5 OCIDebug: START _oci_conn_list_dtor: id=4 OCIDebug: nothing to do.. OCIDebug: START _oci_close_session: logging-off sess=3 OCIDebug: END _oci_conn_list_dtor: id=4 " So, yes, you can place this bug into 5CVS also . I can only mention once more that the last version that worked is 4.3.1. 4.3.2 introduced this bug and it exists ever since. [2004-01-13 13:50:07] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip ---
#26892 [Opn]: ocinewcollection fails with Oracle 9.2
ID: 26892 Updated by: [EMAIL PROTECTED] Reported By: tomy at envox dot hr Status: Open Bug Type: OCI8 related Operating System: Suse 8.2 PHP Version: 4CVS-2004-01-13 (stable) New Comment: PHP_OCI8_HAVE_COLLECTIONS should be defined in ./configure execution process. you should not change its value manually. ./configure checks if there are appropriate functions in oracle client and decides if there is possibility to turn on collection support. so, check ./config.log, plz. it seems, that there is no OCICollAssign function in your OCI version. that's rather strange, 'cause I've tested it successfully with Oracle 9.2.0.1 Previous Comments: [2004-01-14 04:31:19] tomy at envox dot hr Downloaded http://snaps.php.net/php5-latest.tar.gz and compiled. Had to install mysql-develop packages and newer libxml2 packages (I had to "borrow these from Suse 9.0 since there are no libxml2-2.5.10 for Suse 8.2, only 2.5.3, hope this is ok). After compiling and installing I got an error saying that there is no function named ocinewcollection. Revised the source in ext/oci8/oci8.c and noticed that PHP_OCI8_HAVE_COLLECTIONS is note defined, so I defined it and compiled again. After that I got same error from the original bug report in slightly different from. The result of ocinewcollection is still false :(. Output follows " 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=3 user=system OCIDebug: oci_do_connect: id=4 Warning: ocinewcollection() [function.ocinewcollection]: OCITypeByName: ORA-21301: not initialized in object mode in /srv/www/htdocs/envox/info2.php on line 14 Collection failed OCIDebug: START php_rshutdown_oci OCIDebug: END php_rshutdown_oci OCIDebug: START _oci_coll_list_dtor: 5 OCIDebug: END _oci_coll_list_dtor: 5 OCIDebug: START _oci_conn_list_dtor: id=4 OCIDebug: nothing to do.. OCIDebug: START _oci_close_session: logging-off sess=3 OCIDebug: END _oci_conn_list_dtor: id=4 " So, yes, you can place this bug into 5CVS also . I can only mention once more that the last version that worked is 4.3.1. 4.3.2 introduced this bug and it exists ever since. [2004-01-13 13:50:07] [EMAIL PROTECTED] Please try using this CVS snapshot: http://snaps.php.net/php5-latest.tar.gz For Windows: http://snaps.php.net/win32/php5-win32-latest.zip [2004-01-13 13:44:58] [EMAIL PROTECTED] Please, try PHP5 latest snapshots and check if it works with them. [2004-01-13 11:24:47] tomy at envox dot hr Did some trial/error testing with earlier PHP versions and found out that this problem does not exist with version 4.3.1, appears in version 4.3.2 and exists ever since... It is even possible to bypass it by copying 4.3.1 oci extension source to latest CVS snapshot and then the problem does not exist anymore. Also it seems, although I cannot confirm that with 100% certainity, that it only exists if 9.2 client is used by php. It seems that 8.0 client is not affected. Hope this helps. [2004-01-13 06:42:04] tomy at envox dot hr Forgot to mention my oci data from phpinfo...: OCI8 Support enabled Revision $Revision: 1.183.2.7 $ Oracle Version 9.2 Compile-time ORACLE_HOME /opt/oracle/product/9ir2 Libraries Used no value The remainder of the comments for this report are too long. To view the rest of the comments, please view the bug report online at http://bugs.php.net/26892 -- Edit this bug report at http://bugs.php.net/?id=26892&edit=1
#26892 [Opn]: ocinewcollection fails with Oracle 9.2
ID: 26892 User updated by: tomy at envox dot hr Reported By: tomy at envox dot hr Status: Open Bug Type: OCI8 related Operating System: Suse 8.2 PHP Version: 4CVS-2004-01-13 (stable) New Comment: Did some trial/error testing with earlier PHP versions and found out that this problem does not exist with version 4.3.1, appears in version 4.3.2 and exists ever since... It is even possible to bypass it by copying 4.3.1 oci extension source to latest CVS snapshot and then the problem does not exist anymore. Also it seems, although I cannot confirm that with 100% certainity, that it only exists if 9.2 client is used by php. It seems that 8.0 client is not affected. Hope this helps. Previous Comments: [2004-01-13 06:42:04] tomy at envox dot hr Forgot to mention my oci data from phpinfo...: OCI8 Support enabled Revision $Revision: 1.183.2.7 $ Oracle Version 9.2 Compile-time ORACLE_HOME /opt/oracle/product/9ir2 Libraries Used no value [2004-01-13 06:37:08] tomy at envox dot hr 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"; 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 this bug report at http://bugs.php.net/?id=26892&edit=1
#26892 [Opn]: ocinewcollection fails with Oracle 9.2
ID: 26892 User updated by: tomy at envox dot hr Reported By: tomy at envox dot hr Status: Open Bug Type: OCI8 related Operating System: Suse 8.2 PHP Version: 4CVS-2004-01-13 (stable) New Comment: Forgot to mention my oci data from phpinfo...: OCI8 Support enabled Revision $Revision: 1.183.2.7 $ Oracle Version 9.2 Compile-time ORACLE_HOME /opt/oracle/product/9ir2 Libraries Used no value Previous Comments: [2004-01-13 06:37:08] tomy at envox dot hr 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"; 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 this bug report at http://bugs.php.net/?id=26892&edit=1