FW: PHP4 - NT - ODBC problems
| From: | Kevin McLaughlin | Date: | Wed, 26 Jul 2000 20:34:12 +0000 |
| Subject: | FW: PHP4 - NT - ODBC problems | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-1546@lists.php.net to get a copy of this message | ||
Hi,
Sorry to repost... I STILL haven't figured it out yet. I am adding more
information :
I have downloaded and installed php v.4.0.1pl2 on an Win NT Server (SP4). I
am using php4isapi.dll. When I load a test page containing "<? phpinfo()
?>", I see that it is using the WIN32 ODBC library, so I assume that ODBC
support was compiled in, as was mysql.
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:
<HTML>
<HEAD>
<TITLE>The Date</TITLE>
</HEAD>
<BODY>
<P>
<BR>
<P>
<?
$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";
}
?>
</BODY></HTML>
This code runs fine under PHP3 - NT which I have installed on another
server. Can anyone help?
The extra info :
I have downloaded PHP3 and installed it on the same server and the test page
works using the same DSN. I would really like to move to the ISAPI version
of PHP4 though.
PLEASE HELP!!!
Regards,
Kevin McLaughlin