Re: Connection to Oracle Fails Sometimes

From: Date: Fri, 24 Nov 2000 09:54:47 +0000
Subject: Re: Connection to Oracle Fails Sometimes
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-4710@lists.php.net to get a copy of this message
On Wed, Nov 22, 2000 at 02:59:05PM +0700, Sugianto Halim wrote: > I set environment vars in php script, and it works sometimes but when > i did several > quick refresh the script failed to resolve service name. > ERROR: > ORA-12154: TNS:could not resolve service name > Below is the php scripts that get some rows from emp table in > oracle8.1.6 database. > > <? > $user="scott"; > $password="tiger"; > putenv("ORACLE_SID=orauser"); > putenv("ORACLE_HOME=/usr/local/oracle"); > please set those _before_ you start apache (eg in your /etc/rc.d/init.d/httpd script). setting them in your script is know to cause trouble! tc

« previous php.db (#4710) next »