Bug #60154 [Bgs]: OCIEnvNlsCreate() failed. please check that LD_LIBRARY_PATH includes ...
| From: | sixd@php.net | Date: | Mon, 31 Oct 2011 20:07:26 +0000 |
| Subject: | Bug #60154 [Bgs]: OCIEnvNlsCreate() failed. please check that LD_LIBRARY_PATH includes ... | ||
| References: | 1 | Groups: | php.bugs |
| Request: | Send a blank email to php-bugs+get-164736@lists.php.net to get a copy of this message | ||
Edit report at https://bugs.php.net/bug.php?id=60154&edit=1
ID: 60154
Updated by: sixd@php.net
Reported by: jiten dot luhar at gmail dot com
Summary: OCIEnvNlsCreate() failed. please check that
LD_LIBRARY_PATH includes ...
Status: Bogus
Type: Bug
Package: OCI8 related
Operating System: AIX 6.1
PHP Version: 5.3.8
Block user comment: N
Private report: N
New Comment:
For future readers: AIX uses LIBPATH to set the path.
Previous Comments:
------------------------------------------------------------------------
[2011-10-27 22:34:32] sixd@php.net
Since this works in command line PHP there's no indication of a bug in any PHP
code. Please follow up on a support forum such at
http://www.oracle.com/technetwork/forums/php/index.html
There are few things that could be looked at.
------------------------------------------------------------------------
[2011-10-27 21:31:54] jiten dot luhar at gmail dot com
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 this bug report at https://bugs.php.net/bug.php?id=60154&edit=1