OCI8 / Oracle issues with php 5.x

OCI8 / Oracle issues with php 5.x

am 20.01.2006 23:26:01 von YeCkeL

Warning: oci_new_connect() [function.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
$ ./configure --prefix=/wwwroot --enable-so

php cfg line
'./configure' '--prefix=/wwwroot/php' '--with-apxs2=/wwwroot/bin/apxs'
'--with-config-file-path=/wwwroot/php'
'--with-oci8=/opt/oracle/product/10gR2' '--with-curl=/usr/local/lib'
'--with-mcrypt' '--with-xmlrpc'


Any one see were i fuxed up.


--
YeCkeL

Re: OCI8 / Oracle issues with php 5.x

am 21.01.2006 21:19:57 von Steve

On Fri, 20 Jan 2006 23:26:01 +0100, YeCkeL wrote:

>
> Warning: oci_new_connect() [function.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
> $ ./configure --prefix=/wwwroot --enable-so
>
> php cfg line
> './configure' '--prefix=/wwwroot/php' '--with-apxs2=/wwwroot/bin/apxs'
> '--with-config-file-path=/wwwroot/php'
> '--with-oci8=/opt/oracle/product/10gR2' '--with-curl=/usr/local/lib'
> '--with-mcrypt' '--with-xmlrpc'
>
>
> Any one see were i fuxed up.

AIUI oci 8 was built on Oracle 8. You're linking it to Oracle 10. It
seemed to work ok with Oracle 9, but looks like that module needs updating?

$0.02,

Steve

Re: OCI8 / Oracle issues with php 5.x

am 22.01.2006 00:16:11 von Andy Hassall

On Sun, 22 Jan 2006 09:19:57 +1300, Steve wrote:

>On Fri, 20 Jan 2006 23:26:01 +0100, YeCkeL wrote:
>
>> Warning: oci_new_connect() [function.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
>> $ ./configure --prefix=/wwwroot --enable-so
>>
>> php cfg line
>> './configure' '--prefix=/wwwroot/php' '--with-apxs2=/wwwroot/bin/apxs'
>> '--with-config-file-path=/wwwroot/php'
>> '--with-oci8=/opt/oracle/product/10gR2' '--with-curl=/usr/local/lib'
>> '--with-mcrypt' '--with-xmlrpc'
>>
>>
>> Any one see were i fuxed up.
>
>AIUI oci 8 was built on Oracle 8. You're linking it to Oracle 10. It
>seemed to work ok with Oracle 9, but looks like that module needs updating?

That's not the issue - OCI8 is just the API version - it's just as applicable
to 10g as it is to 9i and 8i. The last major API change was in Oracle 7, where
it was called OCI7.

There's definitely something subtle going on here though, as this is a repeat
of the issue from a previous thread "5.1.2 woes". That was triggered by
compiling with "--without-pdo", but it works correctly against 10g if that's
not specified.

The OP hasn't specified that, so there's probably some related library
interaction problem.

To the OP: have you submitted this as a bug on bugs.php.net?

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

Re: OCI8 / Oracle issues with php 5.x

am 22.01.2006 02:29:51 von Mladen Gogala

On Sat, 21 Jan 2006 23:16:11 +0000, Andy Hassall wrote:

> To the OP: have you submitted this as a bug on bugs.php.net?

Yes.

--
http://www.mgogala.com

Re: OCI8 / Oracle issues with php 5.x

am 22.01.2006 02:42:22 von Mladen Gogala

On Fri, 20 Jan 2006 23:26:01 +0100, YeCkeL wrote:

>
> Warning: oci_new_connect() [function.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
> $ ./configure --prefix=/wwwroot --enable-so
>
> php cfg line
> './configure' '--prefix=/wwwroot/php' '--with-apxs2=/wwwroot/bin/apxs'
> '--with-config-file-path=/wwwroot/php'
> '--with-oci8=/opt/oracle/product/10gR2' '--with-curl=/usr/local/lib'
> '--with-mcrypt' '--with-xmlrpc'
>
>
> Any one see were i fuxed up.

Try relinking with --with-pdo-oci=/opt/oracle/product/10gR2

This is a bug and it was reported to bugs.php.net

--
http://www.mgogala.com

Re: OCI8 / Oracle issues with php 5.x

am 22.01.2006 06:09:58 von Mladen Gogala

On Sun, 22 Jan 2006 01:29:51 +0000, Mladen Gogala wrote:

>> To the OP: have you submitted this as a bug on bugs.php.net?
>
> Yes.

Bug number is: 36119

--
http://www.mgogala.com

Re: OCI8 / Oracle issues with php 5.x

am 22.01.2006 17:24:41 von Andy Hassall

On Sun, 22 Jan 2006 05:09:58 GMT, Mladen Gogala wrote:

>On Sun, 22 Jan 2006 01:29:51 +0000, Mladen Gogala wrote:
>
>>> To the OP: have you submitted this as a bug on bugs.php.net?
>>
>> Yes.
>
>Bug number is: 36119

Oh dear, they're taking that sort of attitude are they...

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool

Re: OCI8 / Oracle issues with php 5.x

am 23.01.2006 19:13:36 von mrinal.virnave

I logged in as root
exported ORACLE_HOME environment variable
restarted apache.

The pages started working after that.

Re: OCI8 / Oracle issues with php 5.x

am 23.01.2006 20:48:49 von Andy Hassall

On Fri, 20 Jan 2006 23:26:01 +0100, YeCkeL wrote:

>Warning: oci_new_connect() [function.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
>$ ./configure --prefix=/wwwroot --enable-so
>
>php cfg line
>'./configure' '--prefix=/wwwroot/php' '--with-apxs2=/wwwroot/bin/apxs'
>'--with-config-file-path=/wwwroot/php'
>'--with-oci8=/opt/oracle/product/10gR2' '--with-curl=/usr/local/lib'
>'--with-mcrypt' '--with-xmlrpc'
>
>Any one see were i fuxed up.

Just to rule out the easy solution - what's your permissions on the Oracle
home? I've noticed that a fresh install of 10g locks down the permissions
fairly tightly, so your typical Apache user won't be able to load the libraries
- resulting in this (not very descriptive) error.

--
Andy Hassall :: andy@andyh.co.uk :: http://www.andyh.co.uk
http://www.andyhsoftware.co.uk/space :: disk and FTP usage analysis tool