RE: [PHP-DB] FW: PHP4 - NT - ODBC problems
| From: | Kevin McLaughlin | Date: | Tue, 25 Jul 2000 11:16:14 +0000 |
| Subject: | RE: [PHP-DB] FW: PHP4 - NT - ODBC problems | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-1507@lists.php.net to get a copy of this message | ||
No, thats not it. The TNS name HRTEST is set up. I used sqlplus to connect
to the database, so sqlnet is configured properly, and I used oracles ODBC
test application to test the ODBC DSN, which also works. The DSN has been
set up as both a system and a user DSN...
The only other difference I can think of between the two servers (other than
the PHP3/PHP4 difference) is that the PHP3 Server is using Apache. The other
server is running IIS. I am beginning to wonder if it is a security issue,
as in the IUSR_* user cannot see the DSN.
Anybody out there using a similar config? (NT4 - SP4 - PHP4 - ODBC)
Regards,
Kevin McLaughlin
-----Original Message-----
From: Meir Kriheli - MKsoft [mailto:mksoft@netvision.net.il]
Sent: Wednesday, July 26, 2000 3:31 AM
To: Kevin McLaughlin; php-db@lists.php.net
Subject: Re: [PHP-DB] FW: PHP4 - NT - ODBC problems
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?
--
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