php - Connect to IBM DB2 from Codeigniter -
i have never worked db2 before. trying connect codeigniter. have used following settings in database config file:
$db['default']['hostname'] = 'ipaddress'; $db['default']['port'] = 'portnumber'; $db['default']['username'] = 'uname'; $db['default']['password'] = 'pword'; $db['default']['database'] = 'mydbname'; //$db['default']['dbdriver'] = 'pdo'; $db['default']['dbdriver'] = 'odbc'; $db['default']['dbprefix'] = ''; $db['default']['pconnect'] = false; $db['default']['db_debug'] = true; $db['default']['cache_on'] = false; $db['default']['cachedir'] = ''; $db['default']['char_set'] = 'utf8'; $db['default']['dbcollat'] = 'utf8_general_ci'; $db['default']['swap_pre'] = ''; $db['default']['autoinit'] = true; $db['default']['stricton'] = false;
and throws following error:
unable connect database server using provided settings. filename: c:\xampp\htdocs\archive\system\database\db_driver.php
again, totally new db2, in case need install (i assume driver included in latest ci download) or need define dsn (please let me know how if require that) please let me know, appreciate help.
yes, need install ibm data server client package, or @ least runtime client. download appropriate driver http://www-01.ibm.com/support/docview.wss?uid=swg27016878
the manual explains how configure db2 access php application.
Comments
Post a Comment