From:             
Operating system: AIX 6.1
PHP version:      5.3.8
Package:          OCI8 related
Bug Type:         Bug
Bug description:OCIEnvNlsCreate() failed. please check that LD_LIBRARY_PATH 
includes ...

Description:
------------
Hi,
I recently build following after lots of strugle.
Server: IBM
OS: AIX 6.1
Apache: 2.2.19
PHP: 5.3.8

To make sure I have installed all the pre-requisite using AIX RPM packages
without any errors.

Configure command for Apache:
./configure --prefix=/opt/myenv/share --with-ssl=/usr/bin/openssl
--enable-ssl --enable-setenvif --enable-rewrite --enable-so

I have downloaded Oracle Instace Client 11.1.0.7(Basic + SDK) and unziped
at /opt/myenv/share/oracle

Configure Command for PHP:
./configure --prefix=/opt/myenv/share
--with-config-file-scan-dir=/opt/myenv/share/etc/php.d
--with-apxs2=/opt/myenv/share/bin/apxs  --host=powerpc-ibm-aix6.1.0.0
--with-zlib --with-zlib-dir=/opt/freeware --enable-libxml
--with-libxml-dir=/opt/freeware --with-pcre-dir=/opt/freeware
--with-mysqli=mysqlnd --with-oci8=instantclient,/opt/myenv/share/oracle


Now,
While connecting Oracle database, its giving me following error.

PHP Warning:  ociplogon() [<a
href='function.ociplogon'>function.ociplogon</a>]: OCIEnvNlsCreate()
failed. There is something wrong with your system - please check that
LD_LIBRARY_PATH includes the directory with Oracle Instant Client
libraries


Surprisely, this error not Coming when i run PHP from SHELL script. It will
comes when i run PHP using Apache on Browser.

I tried every solution that i found on all other BUGS/Website.

i.e.
File: /opt/myenv/share/bin/envvars

export LD_LIBRARY_PATH = /opt/myenv/share/oracle 

File: /opt/myenv/share/conf/httpd.conf

SetEnv LD_LIBRARY_PATH /opt/myenv/share/oracle
LoadModule php5_module        modules/libphp5.so


In phpinfo(), it shows LD_LIBRARY_PATH correctly in all sections where it
should be. i.e. in ENVIRONMENT, in PHP Variables, In Apach Environment
sections.

But still, i am having same error with NO LUCK !!!

[As i mentioned, i am not getting this error when executing same file from
SHELL, and it connects to DB successfully]

Expected result:
----------------
OCI8 should able to find LD_LIBRARY_PATH.

/opt/myenv/share/conf/httpd.conf:
SetEnv LD_LIBRARY_PATH /opt/myenv/share/oracle
LoadModule php5_module        modules/libphp5.so

/opt/myenv/share/bin/envvars:
LD_LIBRARY_PATH="/opt/myenv/share/oracle"
export LD_LIBRARY_PATH

/opt/myenv/share/oracle:
-rw-rw-rw-    1 root    root           192 Sep 26 2008  SQLPLUS_README
-r--r--r--    1 root    root           342 Sep 26 2008  glogin.sql
-r-xr-xr-x    1 root    root      36838851 Sep 26 2008  libsqlplus.so
-r-xr-xr-x    1 root    root       1508116 Sep 26 2008  libsqlplusic.so
-r-xr-xr-x    1 root    root      36768154 Sep 26 2008  sqlplus
-r--r--r--    1 root    root      40210154 Sep 26 2008  libclntsh.a
-r--r--r--    1 root    root       6057596 Sep 26 2008  libocci.a
-r-xr-xr-x    1 root    root       4606923 Sep 26 2008  libocci.so
-r-xr-xr-x    1 root    root        714625 Sep 26 2008  libocijdbc11.so
-r--r--r--    1 root    root       1890499 Sep 26 2008  ojdbc5.jar
-r--r--r--    1 root    root       1988051 Sep 26 2008  ojdbc6.jar
-rw-rw-rw-    1 root    root           188 Sep 26 2008  BASIC_README
-rwxrwxrwx    1 root    root         52556 Sep 26 2008  adrci
-rwxrwxrwx    1 root    root         35546 Sep 26 2008  genezi
-r-xr-xr-x    1 root    root      39129029 Sep 26 2008  libclntsh.so
-r-xr-xr-x    1 root    root       4269968 Sep 26 2008  libnnz11.so
-rwxrwxrwx    1 root    root      82898597 Sep 26 2008  libociei.so



Actual result:
--------------
PHP Warning:  ociplogon() [<a
href='function.ociplogon'>function.ociplogon</a>]: OCIEnvNlsCreate()
failed. There is something wrong with your system - please check that
LD_LIBRARY_PATH includes the directory with Oracle Instant Client libraries

-- 
Edit bug report at https://bugs.php.net/bug.php?id=60154&edit=1
-- 
Try a snapshot (PHP 5.4):            
https://bugs.php.net/fix.php?id=60154&r=trysnapshot54
Try a snapshot (PHP 5.3):            
https://bugs.php.net/fix.php?id=60154&r=trysnapshot53
Try a snapshot (trunk):              
https://bugs.php.net/fix.php?id=60154&r=trysnapshottrunk
Fixed in SVN:                        
https://bugs.php.net/fix.php?id=60154&r=fixed
Fixed in SVN and need be documented: 
https://bugs.php.net/fix.php?id=60154&r=needdocs
Fixed in release:                    
https://bugs.php.net/fix.php?id=60154&r=alreadyfixed
Need backtrace:                      
https://bugs.php.net/fix.php?id=60154&r=needtrace
Need Reproduce Script:               
https://bugs.php.net/fix.php?id=60154&r=needscript
Try newer version:                   
https://bugs.php.net/fix.php?id=60154&r=oldversion
Not developer issue:                 
https://bugs.php.net/fix.php?id=60154&r=support
Expected behavior:                   
https://bugs.php.net/fix.php?id=60154&r=notwrong
Not enough info:                     
https://bugs.php.net/fix.php?id=60154&r=notenoughinfo
Submitted twice:                     
https://bugs.php.net/fix.php?id=60154&r=submittedtwice
register_globals:                    
https://bugs.php.net/fix.php?id=60154&r=globals
PHP 4 support discontinued:          
https://bugs.php.net/fix.php?id=60154&r=php4
Daylight Savings:                    https://bugs.php.net/fix.php?id=60154&r=dst
IIS Stability:                       
https://bugs.php.net/fix.php?id=60154&r=isapi
Install GNU Sed:                     
https://bugs.php.net/fix.php?id=60154&r=gnused
Floating point limitations:          
https://bugs.php.net/fix.php?id=60154&r=float
No Zend Extensions:                  
https://bugs.php.net/fix.php?id=60154&r=nozend
MySQL Configuration Error:           
https://bugs.php.net/fix.php?id=60154&r=mysqlcfg

Reply via email to