Cant conect Codeigniter 3.1.5 with Firebird 1.5 - Error No connection could be made because the target machine actively refused it

300 views Asked by At

I am new to Codeigniter 3.1.5 and have a problem with connecting it to Firebird 1.5 (I know it's old version, but I need this one). I am using WAMP 3.0.6 and PHP 5.6.25. I tried with ibase driver, no success. Now I am trying with PDO driver and has "A Database Error Occurred": SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it. In Apache 2.4.23 I have enabled PDO and pdo_sqlite extensions.

This is my code:

 $db['firebird'] = array( 
    'dsn' =>'firebird:dbname=D:\firebird\TEST.;charset=utf8',
    'hostname' => 'localhost',
    'username' => 'sysdba', 
    'password' => 'masterkey', 
    'database' => 'D:\firebird\TEST.FDB',
    'dbdriver' => 'pdo', 
    '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 ); 
1

There are 1 answers

1
pa4o On BEST ANSWER

The problem was that my WAMP was 64-bit and Firebird was 32. Change to 32-bit WAMP and it is working.