RE: [PHP-WIN] Problem Connecting to AS400 using ODBC
| From: | Collins, Robert | Date: | Thu, 11 Apr 2002 20:45:56 +0000 |
| Subject: | RE: [PHP-WIN] Problem Connecting to AS400 using ODBC | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-13044@lists.php.net to get a copy of this message | ||
I put the code in and it worked perfectly. as it turns out there was a
networking issue that I had not been informed of that was causing the
problem. Thanks for your reply.
Robert W. Collins II
Webmaster
New Orleans Regional Transit Authority
Phone : (504) 248-3826
Email : rcollins@norta.com
-----Original Message-----
From: Svensson, B.A.T. (HKG) [mailto:B.A.T.Svensson@lumc.nl]
Sent: Thursday, April 11, 2002 3:23 PM
To: Collins, Robert
Cc: PHP Windows
Subject: RE: [PHP-WIN] Problem Connecting to AS400 using ODBC
What happens if you instrument your code in the following way:
<?
echo "SEGMENT TEST CONNECT: START";
$username = "USERNAME";
$password = "PASSWORD";
$dsn = "DSN";
if($conn = odbc_connect($dsn,$username,$password)){
echo "connected";
}else{
echo "failed";
}
odbc_close($conn);
echo "SEGMENT TEST CONNECT: STOP";
?>
> -----Original Message-----
> From: Collins, Robert [mailto:RCollins@NORTA.COM]
> Sent: Thursday, April 11, 2002 9:15 PM
> To: PHP Windows
> Subject: [PHP-WIN] Problem Connecting to AS400 using ODBC
>
>
> 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);
> ?>
>