Re: FW: PHP4 - NT - ODBC problems

From: Date: Wed, 26 Jul 2000 08:30:44 +0000
Subject: Re: FW: PHP4 - NT - ODBC problems
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-1500@lists.php.net to get a copy of this message
The TNS name "HRTEST" is not defined on that machine. Sheck if you can connect to it use sqlplus. If not, you should define HRTEST, using oracle configuration tools or by modifying TNSNAMES.ORA. On the machine running PHP3 it's probably defined so there's no problem accessing the database; Meir Kriheli MKsoft computer systems 'There's someone in my head but it's not me" - Pink Floyd > I attempted load a test page using ODBC to connect to an Oracle database, > but received the following message : > > Warning: SQL error:[Oracle][ODBC][Ora]ORA-12154: TNS:could not resolve > service name , SQL state 08004 in SQLConnect in [path]\wwwroot/conn.php on > line 10 > > Heres the code: > > $conn = ODBC_Connect("HRTEST","sysadm","sysadm"); > if ($conn) > { > $SQL = "SELECT SYSDATE FROM DUAL"; > $result = ODBC_Do($conn,$SQL); > ODBC_Fetch_Row($result); > $the_date = odbc_result($result,1); > echo " The date is $the_date\n"; > } > ?> > > This code runs fine under PHP3 - NT which I have installed on another > server. Can anyone help?

« previous php.db (#1500) next »