Re: [PHP-DB] Re: [PHP] Oracle + PHP

2004-02-02 Thread Luis Moran Ochoa
Ok, thanks

I will try it.

Michael Mauch wrote:

Luis Moran Ochoa wrote:

 

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
   

Perhaps some variables are set in the start script, but not in your root
shell. Put a
 export /tmp/apache-start

in the start script to see which variables are set. Boot, move
/tmp/apache-start to /tmp/apache-boot, stop apache, start apache from
your root shell. diff -u /tmp/apache-boot /tmp/apache-start will show
the differences.
Or try to unset the locale variables in the start script:

unset LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL

Some parts of Apache/Oracle/whatever-else apparently has trouble with
locales.
Regards...
Michael
 

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


[PHP-DB] Re: [PHP] Oracle + PHP

2004-01-30 Thread Michael Mauch
Luis Moran Ochoa wrote:

 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

Perhaps some variables are set in the start script, but not in your root
shell. Put a

  export /tmp/apache-start

in the start script to see which variables are set. Boot, move
/tmp/apache-start to /tmp/apache-boot, stop apache, start apache from
your root shell. diff -u /tmp/apache-boot /tmp/apache-start will show
the differences.

Or try to unset the locale variables in the start script:

unset LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES LC_PAPER 
LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT LC_IDENTIFICATION LC_ALL

Some parts of Apache/Oracle/whatever-else apparently has trouble with
locales.

Regards...
Michael

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



Re: [PHP-DB] Re: [PHP] Oracle + PHP

2004-01-29 Thread Christopher Jones
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


[PHP-DB] Re: [PHP] Oracle + PHP

2004-01-29 Thread Luis Moran Ochoa
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.

Where can be the problem Why it works if I launch it from a 
console or xterm and not if the system starts it???

Thank you

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