Welcome! Log In Create A New Profile

Advanced

something wrong with php-fpm when using oracle client

Posted by reibill 
HI

I found a problem that , when I use nginx + php + php-fpm + oracle
client , sometime I saw some error message in php-error-log,like this
below

[14-Jul-2009 06:34:06] PHP Warning: oci_connect() [<a
href='function.oci-connect'>function.oci-connect</a>]: OCIEnvNlsCreate
() fail
ed. There is something wrong with your system - please check that
ORACLE_HOME is set and points to the right directory in /home/mypath/
to/test.php on line 411

but I already set the oracle envionment variables

export ORACLE_BASE=/usr/lib/oracle
export ORACLE_HOME=$ORACLE_BASE/10.2.0.3/client
export NLS_LANG=AMERICAN_AMERICA.US7ASCII
export TNS_ADMIN=$ORACLE_HOME/network/admin
export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
export LD_ASSUME_KERNEL=2.6.9
export ORACLE_SID=orcl

export PATH=$HOME/local/rar:$HOME/local/php5.2.8-fcgi/bin/:$PATH

then I use spawn-fcgi instead of php-fpm ,then the error message
disappeared.

so I think may be there is a bug in php-fpm that sometime some process
could not got the envionment

btw: I have config the php-fpm.conf as those below

<value name="environment">
<value name="HOSTNAME">$HOSTNAME</value>
<value name="PATH">/usr/local/bin:/usr/bin:/bin</
value>
<value name="ORACLE_HOME">/usr/lib/oracle/10.2.0.3/
client</value>
<value name="TMP">/tmp</value>
<value name="TMPDIR">/tmp</value>
<value name="TEMP">/tmp</value>
<value name="OSTYPE">$OSTYPE</value>
<value name="MACHTYPE">$MACHTYPE</value>
<value name="MALLOC_CHECK_">2</value>

did someone have the same problems ?
Juan Fco. Giordana
Re: something wrong with php-fpm when using oracle client
October 16, 2009 03:22AM
reibill wrote:
> HI
>
> I found a problem that , when I use nginx + php + php-fpm + oracle
> client , sometime I saw some error message in php-error-log,like this
> below
>
> [14-Jul-2009 06:34:06] PHP Warning: oci_connect() [<a
> href='function.oci-connect'>function.oci-connect</a>]: OCIEnvNlsCreate
> () fail
> ed. There is something wrong with your system - please check that
> ORACLE_HOME is set and points to the right directory in /home/mypath/
> to/test.php on line 411
>
> but I already set the oracle envionment variables
>
> export ORACLE_BASE=/usr/lib/oracle
> export ORACLE_HOME=$ORACLE_BASE/10.2.0.3/client
> export NLS_LANG=AMERICAN_AMERICA.US7ASCII
> export TNS_ADMIN=$ORACLE_HOME/network/admin
> export LD_LIBRARY_PATH=$ORACLE_HOME/lib:$LD_LIBRARY_PATH
> export LD_ASSUME_KERNEL=2.6.9
> export ORACLE_SID=orcl
>
> export PATH=$HOME/local/rar:$HOME/local/php5.2.8-fcgi/bin/:$PATH
>
> then I use spawn-fcgi instead of php-fpm ,then the error message
> disappeared.
>
> so I think may be there is a bug in php-fpm that sometime some process
> could not got the envionment
>
> btw: I have config the php-fpm.conf as those below
>
> <value name="environment">
> <value name="HOSTNAME">$HOSTNAME</value>
> <value name="PATH">/usr/local/bin:/usr/bin:/bin</
> value>
> <value name="ORACLE_HOME">/usr/lib/oracle/10.2.0.3/
> client</value>
> <value name="TMP">/tmp</value>
> <value name="TMPDIR">/tmp</value>
> <value name="TEMP">/tmp</value>
> <value name="OSTYPE">$OSTYPE</value>
> <value name="MACHTYPE">$MACHTYPE</value>
> <value name="MALLOC_CHECK_">2</value>
>
> did someone have the same problems ?

Never tried Oroacle myself, but have you tried echoing ORACLE_HOME
variable with php-fpm and spawn-fcgi to see if the value differs?
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 194
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready