#24343 [Com]: Oracle 9.2.0 client libs do not work

From: Date: Wed, 12 Apr 2006 14:07:01 +0000
Subject: #24343 [Com]: Oracle 9.2.0 client libs do not work
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-95681@lists.php.net to get a copy of this message
ID: 24343 Comment by: michael at six dot de Reported By: thomas at fivemile dot net Status: No Feedback Bug Type: OCI8 related Operating System: Redhat Linux 8.0 PHP Version: 4.3.3-dev New Comment: Right now I had the same error on an older php installation: apache 1.3.31, php 4.3.8, oracle 9.2 (suse linux 9.3). The problem seems to come up when glibc and oracle nls environment variables are not consistent. The original bug report mentions LANG=en_US.UTF-8 NLS_LANG=german_germany.WE8DEC in the non working installation whereas it is LANG=en_US NLS_LANG=german_germany.WE8DEC in the working installation. For me it was unset LANG LC_CTYPE=de_DE.UTF-8 NLS_LANG=GERMAN_GERMANY.WE8ISO8859P1 in the non working case. When unsetting LC_CTYPE everything is ok. Newer suse linux distributions (others too) in general have utf-8 environment variables set. In my case it looks like LC_CTYPE was added in suse 9.3. It seems that system and oracle nls environments simply have to be consistent, for example: LANG=de_DE.UTF-8 NLS_LANG=GERMAN_GERMANY.UTF8 works without a problem. Previous Comments: ------------------------------------------------------------------------ [2004-09-07 19:28:48] roman_petrov at gorodok dot net I have this problem to: I install Oracle 9.2.0, PHP 5.0.1 o(also I try PHP 4.3.8), apache 2.0.50 and get an error when connect to my database with NLS_LANG another, than AMERICAN. My configure command is: Configure Command './configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--without-mysql' '--with-pgsql' '--with-oci8=/opt/oracle/product/9.2.0' '--with-oracle=/opt/oracle/product/9.2.0' '--with-zlib' '--enable-sigchild' My PHPinfo said: oci8 OCI8 Support enabled Revision $Revision: 1.257 $ Active Persistent Links 0 Active Links 0 Oracle Version 9.2 Compile-time ORACLE_HOME /opt/oracle/product/9.2.0 Libraries Used no value Temporary Lob support enabled Collections support enabled oracle Oracle Support enabled Oracle Version 9.0 Compile-time ORACLE_HOME /opt/oracle/product/9.2.0 Libraries Used no value I set NLS_LANG=RUSSIAN.CL8KOI8R Error is OCIDebug: _oci_open_server new conn=0 dname=xxx Warning: oci_new_connect() [function.oci-new-connect]: OCISessionBegin: ORA-00604: error occurred at recursive SQL level 1 ORA-00911: invalid character in /home/www/test.php on line 21 OCIDebug: _oci_open_session: FAILURE -> CLEANUP called When I set NLS_LANG=AMERICAN , connect work and my query return data. But I need NLS_LANG=RUSSIAN.CL8KOI8R for my Russian symbols. Also, oracle (not oci8) functions in PHP work and get me a data with my language. Please, help to me. ------------------------------------------------------------------------ [2004-04-23 13:01:25] tony2001@php.net I would be very thankful, if you try it without this fix, but with latest PHP5 snapshot. BTW, Apache2 is NOT recommended for use in production, so if you want it to be stable, you need to use Apache 1.3.x. ------------------------------------------------------------------------ [2004-04-23 12:54:05] timothy_haak at yahoo dot com Hi Don't know why but by removing the following variable from my profile I managed to get it to work. NLS_LANG="ENGLISH_UNITED KINGDOM.WE8MSWIN1252" export NLS_LANG Hope this helps ------------------------------------------------------------------------ [2004-02-14 08:46:19] timothy_haak at yahoo dot com Hi sorry ment to add the script as well I have also tested connecting from sqlplus which i can do. <?php ociinternaldebug(1); if (OCILogon("<username>", "<password>", "pierceg")) { echo "Successfully connected to Oracle.\n"; } else { echo "Oracle Connect Error "; } ?> ------------------------------------------------------------------------ [2004-02-14 08:38:43] timothy_haak at yahoo dot com Hi I am having a similar issue to the person below here is what the screen prints out when I ad the ociinternaldebug(1); to the top of the file. Warning: ocilogon() [function.ocilogon]: OCISessionBegin: ORA-00604: error occurred at recursive SQL level 1 ORA-00911: invalid character in /Scripts/WEB/test.php on line 3 OCIDebug: _oci_open_session: FAILURE -> CLEANUP called OCIDebug: START _oci_close_session: logging-off sess=0 OCIDebug: _oci_close_session: logging-off DEAD session OCIDebug: oci_do_connect: FAILURE -> CLEANUP called OCIDebug: START _oci_conn_list_dtor: id=0 OCIDebug: END _oci_conn_list_dtor: id=0 Oracle Connect Error OCIDebug: START php_rshutdown_oci OCIDebug: END php_rshutdown_oci I have tried compiling with both php versions PHP 5.0 Beta 4 and PHP 4.3.4 Here is what is loaded into my profile. ORACLE_BASE=/u01/oracle export ORACLE_BASE ORACLE_HOME=/u01/oracle/product/9.2 export ORACLE_HOME ORACLE_SID=PIERCEG export ORACLE_SID PATH=$PATH:$HOME/bin:/u01/oracle/product/9.2/bin export PATH USERNAME="" export USERNAME CLASSPATH=:.:/u01/oracle/product/9.2/jdbc/lib/classes111.zip export CLASSPATH LD_LIBRARY_PATH=/u01/oracle/product/9.2/lib export LD_LIBRARY_PATH ORA_NLS33=/u01/oracle/product/9.2/ocommon/nls/admin/data export ORA_NLS3 NLS_LANG="ENGLISH_UNITED KINGDOM.WE8MSWIN1252" export NLS_LANG NLS_DATE_FORMAT="RRRR-MM-DD HH24:MI:SS" export NLS_DATE_FORMAT PATH=$PATH:/usr/local/jre/bin export PATH LD_ASSUME_KERNEL=2.4.1 export LD_ASSUME_KERNEL Here is the configuration info './configure' '--with-apxs2=/usr/local/apache2/bin/apxs' '--with-oci8' '--enable-track-vars' '--enable-ftp' '--enable-sigchild' '--with-gd' '--enable-gd-native-ttf' '--with-ttf' '--with-freetype-dir=/usr/local/freetype' '--with-jpeg-dir=/usr/lib/' '--with-zlib' '--with-png-dir=/usr/lib/' '--with-xpm-dir=/usr/X11R6' '--with-ldap' '--enable-exif' '--with-png' '--without-tsrm-pthreads' '--enable-inline-optimization' '--with-tiff=/usr/lib/' From phpinfo oci8 OCI8 Support enabled Revision $Revision: 1.248 $ Active Persistent Links 0 Active Links -3 Oracle Version 9.2 Compile-time ORACLE_HOME /u01/oracle/product/9.2 Libraries Used no value Temporary Lob support enabled Collections support enabled ------------------------------------------------------------------------ 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/24343 -- Edit this bug report at http://bugs.php.net/?id=24343&edit=1

« previous php.bugs (#95681) next »