
February 5th, 2013, 05:58 PM
|
|
Registered User
|
|
Join Date: May 2010
Posts: 3
Time spent in forums: 13 m 13 sec
Reputation Power: 0
|
|
|
PHP-DB - DB2 Connection
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:
PHP Code:
$db = new PDO("ibm:DRIVER={IBM DB2 ODBC DRIVER};DATABASE=S104557f;HOSTNAME=10.*.*.*;PORT=8472;PROTOCOL=TCPIP;", "****", "*****");
But I get:
Quote: | SQLSTATE= , SQLDriverConnect: -1390 [IBM][CLI Driver] SQL10007N Message "0" could not be retrieved. Reason code: "3". |
|