Re: Re: Oracle + PHP

From: Date: Thu, 29 Jan 2004 23:53:07 +0000
Subject: Re: Re: Oracle + PHP
References: 1 2  Groups: php.db 
Request: Send a blank email to php-db+get-32706@lists.php.net to get a copy of this message
What's the exact error you get when you try to connect to oracle and what command are you using to connect? Does a phpinfo() script show the Oracle env vars correctly under the "Environment" section? Chris Luis Moran Ochoa wrote:
These are the exact details... /usr/oracle permissions 750 owner oracle.oinstall apache belongs to oinstall. script permissions in /etc/init.d/apache --> 755
ORACLE_SID=OWEB ;    export ORACLE_SID;                             ORACLE_HOME=/usr/oracle/product;   export ORACLE_HOME;
TNS_ADMIN=/usr/oracle/product/network/admin; export TNS_ADMIN; ORACLE_BASE=/usr/oracle; export ORACLE_BASE; ORA_NLS33=/usr/oracle/product/ocommon/nls/admin/data; export ORA_NLS33; ORA_NLS=/usr/oracle/product/ocommon/nls/admin/data; export ORA_NLS; NLS_LANG=spanish_spain.we8dec; export NLS_LANG; TNS_ADMIN=/usr/oracle/product/network/admin; export TNS_ADMIN; CLASSPATH=:/usr/local/jre:/usr/oracle/product/jdbc/lib/classes111.zip: export CLASSPATH; LD_LIBRARY_PATH=/usr/oracle/product/lib:/usr/oracle/product/jdbc/lib: export LD_LIBRARY_PATH case "$1" in
  start)             /opt/apache/bin/apachectl startssl    ;;
stop)
           /opt/apache/bin/apachectl stop   ;;
esac
But the problem is the next: When I login as root (on a console or an xterm) and run that script (/etc/init.d/apache start) everything works fine..... So I've created a link from /etc/rc5.d/S99apache to /etc/init.d/apache for starting it during boot process...... But when I reboot the system and apache is started on boot (oracle is launche thru S20oracle), it start. If you request a php page or other kind of webpage it works fine, until you request a php page that connects to oracle.... Then the instance that is serving that request dies, raise an error that says something like "Couldn't connect to database" and no more php+oracle pages can be requested... But php and apache still works..... If I stop apache and launch it again from console using /etc/init.d/apache start.... It works again and works fine, all connections are successfull..... User apache belongs to oinstall group and have read and execution access to all the oracle directories.


« previous php.db (#32706) next »