ID:               37774
 Updated by:       [EMAIL PROTECTED]
 Reported By:      e2kabugs at troof dot org
-Status:           Open
+Status:           Bogus
 Bug Type:         OCI8 related
 Operating System: Scientific Linux CERN 3 (RHEL 3)
 PHP Version:      5.1.4
 New Comment:

SetEnv obviously won't work and it never did.
You need to change your *environment*, not Apache .conf files. Use
export/putenv/set etc.
Not PHP problem.


Previous Comments:
------------------------------------------------------------------------

[2006-06-10 21:34:18] e2kabugs at troof dot org

Description:
------------
After compiling/installing PHP for Apache2 --with-
oci8=instantclient,/usr/lib/oracle with /usr/lib/oracle 
directory containing the Oracle Instant Client libraries 
with the correct permissions, and having an apache conf file 
in /etc/httpd/conf.d/php.conf with the following directives:

LoadModule php5_module modules/libphp5.so
SetEnv LD_LIBRARY_PATH /usr/lib/oracle

Calls to oci_connect() will result in the following 
misleading error:

Warning: oci_connect() [function.oci-connect]: 
OCIEnvNlsCreate() failed. There is something wrong with your 
system - please check that LD_LIBRARY_PATH includes the 
directory with Oracle Instant Client libraries in [file] on 
line [line]

Inspecting phpinfo() "Environment" and "PHP Variables" 
sections will show that your LD_LIBRARY_PATH is correctly 
set.

The workaround is to change the order of your directives:

SetEnv LD_LIBRARY_PATH /usr/lib/oracle
LoadModule php5_module modules/libphp5.so

and oci_connect will work properly.


Expected result:
----------------
If LD_LIBRARY_PATH needs to be set before loading the module 
(which appears to be the case), an error should be written to 
the error log before any user code tries to use oci8.  The 
error message should be something like the following:

"libphp5.so cannot be loaded.  Missing or incorrect 
LD_LIBRARY_PATH needed for the oci8 Oracle Instant Client 
libraries"




------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=37774&edit=1

Reply via email to