views:

25

answers:

2

I have already installed oracle xe 10g, apache, php in ubuntu by following the ebook Underground Oracle-PHP-manual. But when i run some file connection oracle-PHP using oci_connect() show error :

Warning: oci_connect() [function.oci-connect]: OCIEnvNlsCreate() failed. 
There is something wrong with your system - 
please check that ORACLE_HOME and LD_LIBRARY_PATH 
are set and point to the right directories   
in /usr/local/apache/htdocs/con_oracle.php on line 2

HELP please !!!

A: 

So, do $ORACLE_HOME and $LD_LIBRARY_PATH point to the right directories?

APC
Particularly remembering that Apache is probably running as daemon or guest or some other user, you need to ensure that ORACLE_HOME and LD_LIBRARY_PATH are available for that account, setting them up in /usr/local/apache/bin/envvars if necessary
Mark Baker
A: 

I ready set in /usr/local/apache/bin/envvars filevlike this : ORACLE_HOME="/usr/lib/oracle/xe/app/oracle/product/10.2.0/server" export ORACLE_HOME LD_LIBRARY_PATH="/usr/local/apache/lib:$LD_LIBRARY_PATH" export LD_LIBRARY_PATH

but still error.. and I echo in console : echo $ORACLE_HOME ===> /usr/lib/oracle/xe/app/oracle/product/10.2.0/server echo $LD_LIBRARY_PATH ===> /usr/local/apache/lib:$LD_LIBRARY_PATH

and still... :( :(

any other suggestions ?

abah