Re: ora_logon receive ora-12154

From: Date: Fri, 04 May 2001 01:51:01 +0000
Subject: Re: ora_logon receive ora-12154
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-9115@lists.php.net to get a copy of this message
Hi Miguel, try
if(!($conn=ora_logon("user","pass","SERVICE")))
it always works for me HTH Steve At 10:47 PM +0100 3/5/01, Miguel wrote:
Hi, I'am having serious problems in put php acessing a remote oracle 8 database, i have tried several configurations but always end up with Oracle: Connection Failed: ORA-12154: TNS:could not resolve service name in /var/www/htdocs/support/teste.php on line 5 I can access this database from sqlplus and when I start apache all oracle variables are set. If I get rid of the connect string and access my local database then everything is ok. My code is something like... putenv("ORACLE_HOME=/apps/oracle/8.1.7"); putenv("TNS_ADMIN=/apps/oracle/8.1.7/network/admin"); // main if(!($conn=ora_logon("user@SERVICE","pass"))) echo "Error: Cannot connect to database\n"; exit; } .... Using: apache: apache_1.3.19 php4: php-4.0.5 Linux: Red Hat 7.0 with latest patch's Remote Oracle DB: Oracle 8.1.6 W2K Local DB: Oracle 8.1.7 Linux php build with: --with-oci8 --with-oracle Any help would be apreciated... Thanks, Miguel -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net
-- --------------------------------------------------- "Minds are like parachutes, they work best when open" Support free speech; visit http://www.efa.org.au/ Heads Together Systems Pty Ltd http://www.hts.com.au Email: hts@hts.com.au Tel: 612 9982 6767 Fax: 612 9981 3081

« previous php.db (#9115) next »