By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,574 Members | 2,966 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,574 IT Pros & Developers. It's quick & easy.

Unable to load dynamic library php_ibm_db2.dll

P: 14
HELP!

Setup: PHP5.2.5, IIS 5.1, XP, AS/400 (DB/400 or DB2)

I am trying to connect to a DB2 database from my computer. I installed DB2 Connect and set up the ODBC Driver in the Data Source Administrator. I uncommented the extension=php_ibm_db2.dll line in my php.ini file.

[PHP]<?php
$DBName = "WSC520"; // The name of the database
...

include('adodb/adodb.inc.php');
$db = ADONewConnection('db2');
$db->curMode = SQL_CUR_USE_ODBC;
//$dns = "Driver={IBM DB2 ODBC DRIVER};Database=".$DBName.";Hostname=".$Host.";Po rt=446;Protocol=TCPIP;".
$dns = "Driver={iSeries Access ODBC Driver};Database=".$DBName.";Hostname=".$Host.";Po rt=446;Protocol=TCPIP;".
"Uid=".$User.";Pwd=".$Password;

// if ($db->Connect($Host, $User, $Password)) {
if ($db->Connect($dns, $User, $Password, $DBName)) {
// if ($db->Connect($dns)) {
echo "It worked";
} else {
echo "didn't work";
}
?>[/PHP]

I continue to get the following error no matter what I do:
Expand|Select|Wrap|Line Numbers
  1. PHP Warning:  PHP Startup: Unable to load dynamic library 'C:\php-5.2.5\ext\php_ibm_db2.dll' - The specified module could not be found.
  2.  in Unknown on line 0
I think this is causing my other error:
Expand|Select|Wrap|Line Numbers
  1. PHP Warning:  odbc_connect() [<a href='function.odbc-connect'>function.odbc-connect</a>]: SQL error: [IBM][iSeries Access ODBC Driver]Missing system name needed for connection., SQL state S1000 in SQLConnect in C:\EmployeePortal\adodb\drivers\adodb-odbc.inc.php on line 170
Thanks
Jan 17 '08 #1
Share this Question
Share on Google+
3 Replies


code green
Expert 100+
P: 1,726
Is this DLL exactly where the system is looking for it.You haven't said so.
That is php_ibm_db2.dll is in C:\php-5.2.5\ext\
Jan 18 '08 #2

P: 14
Yes the file is there. I even downloaded it again from the php snapshot for the pecl for 5.2. That didn't help. So I am thinking the file is not corrupted. I can still execute php scripts with this error. I just cannot connect to the DB2. I don't know what else to try...
Jan 18 '08 #3

code green
Expert 100+
P: 1,726
It looks like the instalation of IBM DB2 Universal Database client didn't go well.
I can only suggest a bit more research on the subject, and attempt a re-install, sorry.
Jan 18 '08 #4

Post your reply

Sign in to post your reply or Sign up for a free account.