For our development needs, we try to implement a solution based on a DB2 (9.7.5) database (hosted on Windows 2003) and PHP (Windows too + Apache).
We try to use the PDO ODBC connection directly (with Host, port, etc...) and with the DSN way with no luck...
The db2cli executable works fine (we can query the DB).
We have an error like :
SQLSTATE[ ] SQLDriverConnect: -1393 IBMCLI Driver SQL10007N Message "0" could not be retrieved. Reason code: "6"
Has someone succeeded in connect such this way?
Pinned topic DB2 for Windows, ODBC and PHP
Answered question This question has been answered.
Unanswered question This question has not been answered yet.
Updated on 2012-11-06T16:40:01Z at 2012-11-06T16:40:01Z by SystemAdmin
nivanov1 100000H9H753 Posts
Re: DB2 for Windows, ODBC and PHP2012-11-02T21:22:00ZThis is the accepted answer. This is the accepted answer.> SQL10007N Message "0" could not be retrieved. Reason code: "6"
This usually indicates some sort of an environment misconfiguration.
Are you using the latest pdo_ibm driver?
SystemAdmin 110000D4XK5837 Posts
Re: DB2 for Windows, ODBC and PHP2012-11-06T16:40:01ZThis is the accepted answer. This is the accepted answer.
- nivanov1 100000H9H7
I first tried the pdo_ibm but never suceeded in making it working (I compiled successfully the source with my version of php under windows, started apache successfully without errors - I think the error message is the same for that driver).
So, I hoped that as ODBC is the 'standard' and multi-DB it could work at first use... no way
I'm investigating into Zend framework but I know it uses db2connect and not PDO which is not convenient for me.
I will try a Linux DB2 install too (as I think it's an access right problem and as windows and linux are different on that point) which can be a successful solution for me.
So, if you have another idea...