473,602 Members | 2,751 Online
Bytes | Software Development & Data Engineering Community
+ 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'>funct ion.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 28117
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'>funct ion.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****@sbcglob al.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'>funct ion.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****@sbcglob al.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'>funct ion.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
3612
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 <<<<<<<<<<<<<<< Instead of saying 3.23.57, shouldn't it show 5.xx.xx? Or, did I do something wrong?
19
2173
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 occasional deodorant throw, which if I mad add, was precisily aimed at my head. I am talking about my wife, who if I failed to mention is not only a good shot *ouch*, but has also recently delved into the realm of Object Oriented - PHP Programming. ...
0
1150
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, Thanks. Urs
8
4618
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 /wwwroot/htdocs/test.php on line 8 I am having this dump on my recent suse 10/oracle 10.2/apache 2.2.0/php5.1.2. Any ideas i pritty much used a uber basic. apache cfg line
0
2397
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 "OCIEnvNlsCreate failed with return code -1 but error message text was not available" Any one seen this or anything similar? Thank you in advance for all tips,suggestions,advices & helps
0
3120
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 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...
2
25812
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 Oracle Connect Error my file test.php : <?php PutEnv("ORACLE_SID=TEST"); PutEnv("ORACLE_HOME=/oracle/ora102"); PutEnv("TNS_ADMIN=/oracle/ora102/network/admin");
0
1688
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 '....') i don\t know what is the problem while connecting to the oracle, my code in the map file is LAYER CONNECTIONTYPE oraclespatial CONNECTION "usr/pass@srv" NAME "xxx" TYPE POLYGON STATUS ON UNITS METERS
2
1453
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 try is fruitless. Any ides? Thank you,
0
7920
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8401
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
8404
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8268
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
6730
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
5867
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
3944
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
1510
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
1254
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.