php - Codeigniter not able to connect to firebird -


i have seen , tried solutions in codeigniter - multiple database connections, you have specified invalid database connection group codeigniter error, firebird - codeigniter connection , none of them worked.

$db['default']['hostname'] = 'localhost'; $db['default']['username'] = 'root'; $db['default']['password'] = ''; $db['default']['database'] = 'testing'; $db['default']['dbdriver'] = 'mysqli'; $db['default']['dbprefix'] = ''; $db['default']['pconnect'] = true; $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;   $db['fbird']['hostname'] = "localhost"; $db['fbird']['username'] = "sysdba"; $db['fbird']['password'] = "masterkey";     $db['fbird']['database'] = "c:\waitkyl.fdb"; $db['fbird']['dbdriver'] = "firebird"; 

after configuration, call fbird database way:

class fb_model extends ci_model{      public function __construct(){         parent::__construct();     }      public function getall(){         $db = $this->load->database('fbird', true);          return $db->get('categories')->result();         } } 

and error after trying output values print_r($this->fb_model->getall()); is:

fatal error: call member function result() on non-object

that means table 'categories' doesn't exists..which isn't true.

so have tried change configuration file into:

$db['fbird']['hostname'] = "localhost"; $db['fbird']['username'] = "sysdba"; $db['fbird']['password'] = "masterkey";     $db['fbird']['database'] = "c:\waitkyl.fdb"; $db['fbird']['dbdriver'] = "firebird"; $db['fbird']['dbprefix'] = ""; $db['fbird']['pconnect'] = false; $db['fbird']['db_debug'] = true; $db['fbird']['cache_on'] = false; $db['fbird']['cachedir'] = ""; $db['fbird']['char_set'] = "utf8"; $db['fbird']['dbcollat'] = "utf8_general_ci"; 

and removed php.ini file ; following lines:

extension=php_pdo_firebird.dll extension=php_interbase.dll 

and if refresh page error receive is:

unable connect database server using provided settings.

filename: c:\xampp\htdocs\projtesting\system\database\db_driver.php

line number: 124

in order see if credentials database fine opened on software sql manager 2008 lite interbase , firebird, , ok. ideas of what's going wrong?

solution: codeigniter 3 (dbdriver = ibase)

$db['firebird'] = array(     'dsn'   => '',     'hostname' => 'localhost',     'username' => 'sysdba',     'password' => 'masterkey',     'database' => 'c:/database.gdb',     'dbdriver' => 'ibase',     'dbprefix' => '',     'pconnect' => false,     'db_debug' => (environment !== 'production'),     'cache_on' => false,     'cachedir' => '',     'char_set' => 'ansi',     'dbcollat' => 'none',     'swap_pre' => '',     'encrypt' => false,     'compress' => false,     'stricton' => false,     'failover' => array(),     'save_queries' => true ); 

Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -