General discussion on PHP
Post Reply
Posts: 6
Joined: Thu Jan 21, 2010 6:13 pm


Post by pcwa2006 » Wed Feb 06, 2013 12:56 am

What I want to do is from a linux box with Zend Server 5.3 connect to an iSeries DB2 and simply do SELECT statements against it.

I have installed php-5.2-pdo-ibm-zend-server & php-5.2-ibmdb2-zend-server, and they show green in the server console.

I would think using the PDO would be the easiest. However I am having a hell of a time. Anyone have any tutorials on getting this to work?

I have tried:

Code: Select all

$db = new PDO("ibm:DRIVER={IBM DB2 ODBC DRIVER};DATABASE=S104557f;HOSTNAME=10.*.*.*;PORT=8472;PROTOCOL=TCPIP;", "****", "*****");
But I get:
SQLSTATE= , SQLDriverConnect: -1390 [IBM][CLI Driver] SQL10007N Message "0" could not be retrieved. Reason code: "3".

Posts: 34
Joined: Tue Nov 16, 2010 3:51 pm

Re: DB2

Post by bvirzi » Tue Feb 12, 2013 10:17 am


I know that to use a db2 function from windows to as400, you need an IBM product called "db2 connect" installed on windows. I don't know how it works with linux.


Post Reply