EDIT: It is entirely possible to do this for free This still requires a license, I'm not sure how much or exactly which license is needed as mine was bundled with my installer.
I'm trying to connect to an IBM i DB2 server from a local PC as part of a PHP application. I'm trying to set myself up for local development.
I can't find a download for "IBM DB2 Universal Database client" and/or "IBM DB2 Connect" mentioned below. Has anyone done this before and could lend some insight? I'm open to alternate solutions so long as the db2_* functions are available. I'm working with existing code with no easy/quick way to switch between connection types between development and production.
This is a near duplicate question as here but that too did not have an answer. The OP ended up giving up and connected with "IBM Client Access OLE DB" using "IBMDA400", but I also can't find a download for it. I'm not even sure if this method would enable the db2_* functions either.
- I'm using a Bitnami Wamp stack (https://bitnami.com/stack/wamp)
- I have downloaded the php_ibm_db2.dll from
https://pecl.php.net/package/ibm_db2 and added
extension=php_ibm_db2.dll
to my php.ini file. - I've confirmed the php.ini file is the one being used by checking the
output of
echo phpinfo();
and successfully modifying it. - I've also placed
php_ibm_db2.dll
in the location specified by theextension_dir
directive.extension_dir = "C:\Bitnami\wampstack-5.6.29-1\php\ext"
The only PHP error I see logged is when I start up the server (which is still successful - albeit no db2_* functions).
[18-Jan-2017 21:08:18 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Bitnami\wampstack-5.6.29-1\php\ext\php_ibm_db2.dll' - The specified module could not be found.
in Unknown on line 0
[18-Jan-2017 21:08:19 UTC] PHP Warning: PHP Startup: Unable to load dynamic library 'C:\Bitnami\wampstack-5.6.29-1\php\ext\php_ibm_db2.dll' - The specified module could not be found.
in Unknown on line 0
But the file C:\Bitnami\wampstack-5.6.29-1\php\ext\php_ibm_db2.dll
does exist and has the same exact permissions as every other *.dll file in the directory (which has not been modified since the Wamp stack was installed).
I have read that "IBM DB2 Universal Database client" and "IBM DB2 Connect" must be installed on the same machine running PHP here but am having trouble finding a download for either. I can find instructions on how to install each, but no download link.
I've found a download for "IBM Data Server Client" which is behind a log in on IBM's site. I'm wondering if this is one of the two programs I need installed just by a different name. I know name consistency isn't IBM's best attribute... :D