php_ibm_db2.dll on IIS 7.5 using PHP 5.3 error message

Posted by grmbl on Server Fault See other posts from Server Fault or by grmbl
Published on 2013-11-12T14:29:52Z Indexed on 2013/11/12 15:53 UTC
Read the original article Hit count: 342

I'm trying to use ibm_db2 extension to access iSeries DB2 database.

This is the testcode (taken from here)

<?php
$database = 'ALI452BFAL'; //library
$user = 'STN452';
$password = '**********';
$hostname = 'myserverip';
$port = 50000;

$conn_string = "DRIVER={IBM DB2 ODBC DRIVER};DATABASE=$database;" .
  "HOSTNAME=$hostname;PORT=$port;PROTOCOL=TCPIP;UID=$user;PWD=$password;";
$conn = db2_connect($conn_string, '', '');

if ($conn) {
    print "ok";
    db2_close($conn);
}
else {
    echo db2_conn_error() . '<br>' . db2_conn_errormsg();
}
?>

I have installed a very basic package containing the db2 driver and added this as an extension.
(IBM Data Server Driver for ODBC, CLI, and .NET.msi)

This is my result:

08001 [IBM][CLI Driver] SQL30081N A communication error has been detected. Communication protocol being used: "TCP/IP". Communication API being used: "SOCKETS". Location where the error was detected: "10.10.0.120". Communication function detecting the error: "connect". Protocol specific error code(s): "10061", "", "". SQLSTATE=08001 SQLCODE=-30081

Anybody tried this before??

© Server Fault or respective owner

Related posts about windows-server-2008

Related posts about iis7.5