RE [PHP-INSTALL] OCIEnvNlsCreate() failed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]




When you su root to start apache check your environment variables,

i usually log in as oracle user then i use su command so the root user still possess the env variables needed, but right now i have an issue that LD_LIBRARY_PATH is simply erased when i su, i don't know why and this block me from being able to use PDO_OCI or oci8, so i edited apache2ctl script and added the line 'export LD_LIBRARY_PATH=/path/to/oracle/libs/:$LD_LIBRARY_PATH'
That allowed to be able to use oci8 but i am still stucked with PDO_OCI for 3 weeks already complaining about OCI_INVALID_HANDLE error message.

I hope the method i explained will help you

Jerôme Kaluza
Service du Sang
Service Informatique
Croix-Rouge de Belgique
rue de Stalle 96 - 5e étage
B-1180 Bruxelles
Tél. : + 32 (0)2 371 35 27
Fax : + 32 (0)2 371 35 23
j.kaluza@xxxxxxxxxxxxxxxxxxxxxxx
http://www.transfusion.be

P.S.: Le temps de lire ce mail, 1 personne aura eu besoin d’une transfusion en Belgique pour survivre. Alors, n'oublions pas : une vie est irremplaçable, pas le sang ! Plus d'infos, sur
http://www.transfusion.be.


ahmed nabel <a_n_alazzawi@xxxxxxxxxxx>

20/06/2008 13:05

A
<php-install@xxxxxxxxxxxxx>
cc
Objet
OCIEnvNlsCreate() failed






Hi

A problem with connecting to remote oracle db via php. The error message is:

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 /Library/WebServer/Documents/test.php on line 14
Oracle connection failed.

The phpinfo shows:

Apache Environment

...
...
PATH                 /usr/bin:/bin:/usr/sbin:/sbin
...

oci8

OCI8 Support                 enabled
Version                 1.2.4
Revision                 $Revision: 1.269.2.16.2.38 $
Active Persistent Connections                 0
Active Connections                 0
Oracle Instant Client Version                 10.2
Temporary Lob support                 enabled
Collections support                 enabled

Directive                 Local Value                 Master Value
oci8.default_prefetch                 10                 10
oci8.max_persistent                 -1                 -1
oci8.old_oci_close_semantics                 0                 0
oci8.persistent_timeout                 -1                 -1
oci8.ping_interval                 60                 60
oci8.privileged_connect                 Off                 Off
oci8.statement_cache_size                 20                 20

...
Environment

Variable                 Value
PATH                 /usr/bin:/bin:/usr/sbin:/sbin

...
...

Any ideas?

PS: php 5.2.5 Apache 2.2.8 Mac OS X 10.5.2
_________________________________________________________________

http://clk.atdmt.com/UKM/go/msnnkmgl0010000009ukm/direct/01/

[Index of Archives]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [Postgresql]     [PHP Books]     [PHP Databases]     [PHP SOAP]
  Powered by Linux