apache php and oracle

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Hello all,

I am trying to get php to work with oracle and apache.

when I execute a script with ph that connects to an oracle database it  
seems to work.

php without "oracle stuff" in apache seems to work.

However when I try the script that connects to the database via the web  
I get messages like:
OCISessionBegin: ORA-03106: fatal two-task communication protocol error in

any ideas ?  (does php not see the ORACLE_HOME and ORACLE_BIN  
environment variables ?)



Re: apache php and oracle

Ron Croonenberg wrote:

Quoted text here. Click to load it

Hi Ron,

I cannot help you with Oracle connecting, but if you want to test things  
concerning environmentvariables, have a look at www.php.net and lookup  
putenv() function.

Good luck.

Erwin Moller

Re: apache php and oracle

On Mon, 11 Sep 2006 20:00:17 -0400, Ron Croonenberg wrote:

Quoted text here. Click to load it

Try testing it with phpinfo(). It will show you oracle home and oracle sid.
What is "ORACE_BIN" for? Here is what my environment looks like:

$ php -r "phpinfo();"|grep -i oracle
Oracle Version =>
Compile-time ORACLE_HOME =>
TNS_ADMIN => /oracle/product/10g/network/admin
ORACLE_HOME => /oracle/product/10g
PATH => /oracle/product/10g/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/X11R6/bin:/usr/local/java/bin:/usr/lib/qt-3.3/bin:/home/mgogala/bin:.
LD_LIBRARY_PATH => /oracle/product/10g/lib
ORA_NLS10 => /oracle/product/10g/nls/data
_SERVER["TNS_ADMIN"] => /oracle/product/10g/network/admin
_SERVER["ORACLE_HOME"] => /oracle/product/10g
_SERVER["PATH"] => /oracle/product/10g/bin:/usr/local/bin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/X11R6/bin:/usr/local/java/bin:/usr/lib/qt-3.3/bin:/home/mgogala/bin:.
_SERVER["LD_LIBRARY_PATH"] => /oracle/product/10g/lib
_SERVER["ORA_NLS10"] => /oracle/product/10g/nls/data

Of course, to get the picture about the environment of the httpd process,
you must execute phpinfo from within the httpd process. Also, if you're
running Oracle 10.2, you need to fix protection on $ORACLE_HOME/network
and $ORACLE_HOME/nls. Problem is that $ORACLE_HOME no longer has 755

Site Timeline