473,466 Members | 1,413 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

OCI8 & PHP5 OCIEnvNlsCreate() failed.

I am having issues maintaining an oracle connection in my apache/php
web application. I am able to succesfully connect to an Oracle 9i
dbase using oci() and retrieve expected results for the first couple of
attempts - then it dies with a msg in the apache error_log that looks
like:

PHP Warning: ocilogon() [<a
href='function.ocilogon'>function.ocilogon</a>]: OCIEnvNlsCreate()
failed. There is something wrong with your system - please check that
ORACLE_HOME is set and points to the right directory in ...

===

PHP Version 5.0.4

Apache/2.0.54 (Fedora)

below is phpinfo:

'./configure' '--build=i386-redhat-linux' '--host=i386-redhat-linux'
'--target=i386-redhat-linux-gnu' '--program-prefix=' '--prefix=/usr'
'--exec-prefix=/usr' '--bindir=/usr/bin' '--sbindir=/usr/sbin'
'--sysconfdir=/etc' '--datadir=/usr/share' '--includedir=/usr/include'
'--libdir=/usr/lib' '--libexecdir=/usr/libexec' '--localstatedir=/var'
'--sharedstatedir=/usr/com' '--mandir=/usr/share/man'
'--infodir=/usr/share/info' '--cache-file=../config.cache'
'--with-libdir=lib' '--with-config-file-path=/etc'
'--with-config-file-scan-dir=/etc/php.d' '--disable-debug' '--with-pic'
'--disable-rpath' '--with-bz2' '--with-curl' '--with-exec-dir=/usr/bin'
'--with-freetype-dir=/usr' '--with-png-dir=/usr'
'--enable-gd-native-ttf' '--without-gdbm' '--with-gettext' '--with-gmp'
'--with-iconv' '--with-jpeg-dir=/usr' '--with-openssl' '--with-png'
'--with-pspell' '--with-expat-dir=/usr' '--with-pcre-regex=/usr'
'--with-zlib' '--with-layout=GNU' '--enable-exif' '--enable-ftp'
'--enable-magic-quotes' '--enable-sockets' '--enable-sysvsem'
'--enable-sysvshm' '--enable-sysvmsg' '--enable-track-vars'
'--enable-trans-sid' '--enable-yp' '--enable-wddx'
'--with-pear=/usr/share/pear' '--with-kerberos'
'--enable-ucd-snmp-hack' '--with-unixODBC=shared,/usr'
'--enable-memory-limit' '--enable-shmop' '--enable-calendar'
'--enable-dbx' '--enable-dio' '--with-mime-magic=/etc/httpd/conf/magic'
'--without-sqlite' '--with-libxml-dir=/usr' '--with-xml'
'--with-apxs2=/usr/sbin/apxs' '--without-mysql' '--without-gd'
'--without-odbc' '--disable-dom' '--disable-dba'
Any suggestions?

Feb 7 '06 #1
4 28099
On Tue, 07 Feb 2006 14:16:33 -0800, cyrano wrote:
I am having issues maintaining an oracle connection in my apache/php
web application. I am able to succesfully connect to an Oracle 9i
dbase using oci() and retrieve expected results for the first couple of
attempts - then it dies with a msg in the apache error_log that looks
like:

PHP Warning: ocilogon() [<a
href='function.ocilogon'>function.ocilogon</a>]: OCIEnvNlsCreate()
failed. There is something wrong with your system - please check that
ORACLE_HOME is set and points to the right directory in ...


It's an old and buggy OCI8. What you should do is relink without OCI8
and link in OCI8 as a PECL extension.

--
http://www.mgogala.com

Feb 9 '06 #2
Mladen,

I've been beating my head against this for the last two days and saw
your exchange with bugs.php.net :(

Can you please elaborate on your suggestion and point me in the right
direction for installing OCI8 as a PECL extension? I've never claimed
to be much of an admin, I'm just a dumb programmer trying to get these
pieces to play together.

Many thanks!

-- John Navratil

"Mladen Gogala" <go****@sbcglobal.net> wrote in message
news:pa****************************@sbcglobal.net. ..
On Tue, 07 Feb 2006 14:16:33 -0800, cyrano wrote:
I am having issues maintaining an oracle connection in my apache/php
web application. I am able to succesfully connect to an Oracle 9i
dbase using oci() and retrieve expected results for the first couple
of
attempts - then it dies with a msg in the apache error_log that looks
like:

PHP Warning: ocilogon() [<a
href='function.ocilogon'>function.ocilogon</a>]: OCIEnvNlsCreate()
failed. There is something wrong with your system - please check that
ORACLE_HOME is set and points to the right directory in ...


It's an old and buggy OCI8. What you should do is relink without OCI8
and link in OCI8 as a PECL extension.

--
http://www.mgogala.com


Feb 9 '06 #3
Greetings,

I've been all over this PHP 5.1.2 OCI8 connection issue for the last
couple of days and believe the problem is that the OCI8 extension
requires more access to the oracle installation than it should. I was
able to get past this by adding the 'oinstall' group to the 'apache'
user. Obviously this is not a very secure solution, but it is as far as
I was able to take it given that I am a terrible sysadmin and by no
means and oracle DBA.

For more information you may wish to look into bugs.php.net at bug#
36355.

-- John Navratil

"Mladen Gogala" <go****@sbcglobal.net> wrote in message
news:pa****************************@sbcglobal.net. ..
On Tue, 07 Feb 2006 14:16:33 -0800, cyrano wrote:
I am having issues maintaining an oracle connection in my apache/php
web application. I am able to succesfully connect to an Oracle 9i
dbase using oci() and retrieve expected results for the first couple
of
attempts - then it dies with a msg in the apache error_log that looks
like:

PHP Warning: ocilogon() [<a
href='function.ocilogon'>function.ocilogon</a>]: OCIEnvNlsCreate()
failed. There is something wrong with your system - please check that
ORACLE_HOME is set and points to the right directory in ...


It's an old and buggy OCI8. What you should do is relink without OCI8
and link in OCI8 as a PECL extension.

--
http://www.mgogala.com


Feb 10 '06 #4
On Fri, 10 Feb 2006 17:21:30 +0000, John Navratil wrote:
For more information you may wish to look into bugs.php.net at bug#
36355.


John, thanks for pointing that out to me. It seems that you are right,
something is wrong with the Oracle 10.2 environment but I am unable to
pinpoint what exactly it is. So far, I discovered that this applies not
only to PHP, but also to CGI scripts (using DBD). Now the number of files
that are protected is huge:
find $ORACLE_HOME \( -perm 750 -o -perm 640 \) -print|wc -l
7890

Now, doing something like chmod -R o+rx $ORACLE_HOME would probably solve
the problem, but it might introduce few other problems as well. I'm
considering downloading 10.1 client and linking PHP against it to see
whether the problem persists.

--
http://www.mgogala.com

Feb 11 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
by: Sarah Tanembaum | last post by:
Though I installed MySQL5 and PHP5, how come my phpinfo() shows as follow: MySQL Support enabled Active Persistent Links 0 Active Links 0 Client API version 3.23.57 <<<<<<<<<<<<<<< ...
19
by: Ramon | last post by:
Hello all, Over the last couple of month, since the release of PHP 5 I have been involved in a number of heated discussions which sometimes reduced them selves to blatant name calling and an...
0
by: Urs Vogel | last post by:
Hi I sometimes encounter an exception saying that the drag&drop registration failed. What could be the cause of this exception? I couldn't find any documentation. Any hints are appreciated,...
8
by: YeCkeL | last post by:
Warning: oci_new_connect() : OCIEnvNlsCreate() failed. There is something wrong with your system - please check that ORACLE_HOME is set and points to the right directory in...
0
by: sreejith.ram | last post by:
I did google & search in this group , but couldnt find any thing related to this. This is my first attempt to connect GridView to a Oracle database via SqlDataSource. I am receving error message...
0
by: ravinder1983 | last post by:
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() : OCIEnvNlsCreate() failed. There is something wrong with...
2
by: JuliouZ | last post by:
Warning: ocilogon() : OCIEnvNlsCreate() failed. There is something wrong with your system - please check that ORACLE_HOME is set and points to the right directory in /web/htdocs/test.php on line 6...
0
by: egyptian2007 | last post by:
dear all this is my first time in this fourm, i want your help urgently, when i made a connection to oracle 10g, php, ms4w i got that error (Warning: : msDrawMap(): Failed to draw layer named '....')...
2
zorgi
by: zorgi | last post by:
I have problems installing oci8 for php5. I looked around but am stuck. I edited php.ini and uncommented extension=php_oci8 but this is not helping. I copied around some other dll-s but everything I...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.