problem connecting to postgres - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Using CodeIgniter (https://forum.codeigniter.com/forumdisplay.php?fid=5) +--- Forum: General Help (https://forum.codeigniter.com/forumdisplay.php?fid=24) +--- Thread: problem connecting to postgres (/showthread.php?tid=289) |
problem connecting to postgres - newphpprogrammer - 11-18-2014 Hello! I am trying connect to postgres, but doesn't work. In my database.php I have something like $db['default']['hostname'] = '192.168.0.207'; $db['default']['username'] = 'postgres'; $db['default']['password'] = 'rontur'; $db['default']['database'] = 'stand'; $db['default']['dbdriver'] = 'postgre'; $db['default']['port'] = '5432'; $db['default']['dbprefix'] = ''; $db['default']['pconnect'] = TRUE; $db['default']['db_debug'] = TRUE; $db['default']['cache_on'] = FALSE; ......................................... Now, if I try connect using odbc, it works!, $db['default']['hostname'] = 'DRIVER={PostgreSQL ANSI};SERVER=192.168.0.207;DATABASE=stand'; $db['default']['username'] = 'postgres'; $db['default']['password'] = 'rontur'; $db['default']['database'] = 'stand'; $db['default']['dbdriver'] = 'odbc'; any idea? Best Regards Fernando RE: problem connecting to postgres - bclinton - 11-18-2014 Do you get an error message? RE: problem connecting to postgres - tapan.thapa - 11-18-2014 (11-18-2014, 04:00 PM)newphpprogrammer Wrote: Hello! Which version of CI you are on? RE: problem connecting to postgres - blagi - 11-19-2014 (11-18-2014, 04:00 PM)newphpprogrammer Wrote: Hello! Probably you don't have Postgres in PHP (php.ini)? Best regards blagi RE: problem connecting to postgres - newphpprogrammer - 11-19-2014 Oh sorry, You had reason, I forgot change php.ini. Now works! Thanks a lots! |