Problem Connecting to AS400 using ODBC
| From: | Collins, Robert | Date: | Thu, 11 Apr 2002 19:15:23 +0000 |
| Subject: | Problem Connecting to AS400 using ODBC | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-13041@lists.php.net to get a copy of this message | ||
I am trying to access data on an AS/400(IBM DB2) from a windows platform
using Apache, and PHP. The problem I am having is that the script doesn't
appear to do anything, it will run constantly and doesn't produce an error
or time out. I have tried setting the ODBC DSN as both user and server. Has
anyone else had this problem, and if so what was the fix?
Using :
Windows 2k o NT4
PHP ver.4.1.1
APACHE ver. 1.3.22
Client Access ODBC Driver (32bit) ver. 7.00.00.00
Code Snippet:
<?
$username = "USERNAME";
$password = "PASSWORD";
$dsn = "DSN";
if($conn = odbc_connect($dsn,$username,$password)){
echo "connected";
}else{
echo "failed";
}
odbc_close($conn);
?>
Robert W. Collins II
Webmaster
New Orleans Regional Transit Authority
Phone : (504) 248-3826
Email : rcollins@norta.com