Re: Re: [PHP] Oracle + PHP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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.

-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux