how to connect to IBM i with php_pdo_ibm.dll

General discussion on Zend Studio for IBM System i
Post Reply
gfroehlich
Posts: 24
Joined: Tue Jul 06, 2010 11:48 am

how to connect to IBM i with php_pdo_ibm.dll

Post by gfroehlich » Fri Jun 22, 2012 9:23 am

I have an application that uses Pdo_Ibm driver with ZF running directly on the i5. Now I want to run Unit-/IntegrationTests on my Windows client started in Zend Studio. I was able to load php_pdo_ibm.dll, but it was not possible to connect to DB2 on i5.

connection parameter from ini file:
database.adapter = Pdo_Ibm
database.params.host = MYHOST
database.params.port = 446 OR 447 OR 8471
database.params.dbname = MYRDB
database.params.username = MYUSER
database.params.password = MYPW
database.params.os = i5
database.params.persistent = false

I tried to the ports for DRDA 446, DDM 447 and as-database 8471, but succeeded with none of them. With DRDA and DDM I've got a license error on client side, because I've no license for DB2Client. With as-database there was no error, the socket connection was open on i5, but the connection step never terminated. The socket on i5 was still open, after I killed the session on client.

Code from Zend_Db_Adapter_Pdo_Abstract:

Code: Select all

...
        try {
            $this->_connection = new PDO(
                $dsn,
                $this->_config['username'],
                $this->_config['password'],
                $this->_config['driver_options']
            );
...
Does anybody knows what service/port is used by pdo_ibm? Is it necessary to have a license for DB2Client to connect from windows to IBM i with PDO?

Thanks in advance
Gabriel

Post Reply