By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,304 Members | 1,254 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,304 IT Pros & Developers. It's quick & easy.

PHP + OCI8 not working(error ": OCIEnvNlsCreate() failed + ORACLE_HOME not right")

P: 2
Hi All,

I am new to this world of php. I tried getting oci8 work with php but to no avail. The error i recieve is "Warning: ocilogon() [function.ocilogon]: OCIEnvNlsCreate() failed. There is something wrong with your system - please check that ORACLE_HOME is set and points to the right directory". My Oracle version is 10.2.0 and php version is 5.1.6

I have set the following environment variables:
ORACLE_HOME, TNS_ADMIN, NLS_LANG,LD_LIBRARY_PATH
in the following places
a)/etc/sysconfig/httpd
b)/etc/httpd/conf/httpd.conf
c)in the script itself
I have tried adding oinstall group to apache user but it didn't wotk either.

I am able to connect to oracle with sqlplus and I am also able to get phpinfo() working. I don't know where the problem lies.
I suspect that php is not able to ceate n oracle environment in order to run different oracle based commands in php. As last measure, I also added the above 4 variables in /etc/profile(which is available to all the users) but still it didn't work.

Can anyone please guide me in order to resolve this error.
Thanks
Ravinder
Apr 25 '07 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.