Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/database/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/codeigniter/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Database 将firebird数据库与codeigniter连接_Database_Codeigniter_Firebird - Fatal编程技术网

Database 将firebird数据库与codeigniter连接

Database 将firebird数据库与codeigniter连接,database,codeigniter,firebird,Database,Codeigniter,Firebird,所以,我必须连接到firebird数据库。我在系统/数据库目录中插入了,但我的代码没有建立连接。它没有进入控制器,而是在连接的某个点退出。最糟糕的是,它甚至没有显示错误。都是空白的/ 我的数据库配置: $active_group = 'default'; $active_record = TRUE; $db['default']['hostname'] = MyIp; $db['default']['username'] = 'MyUser'; $db['default']['password'

所以,我必须连接到firebird数据库。我在系统/数据库目录中插入了,但我的代码没有建立连接。它没有进入控制器,而是在连接的某个点退出。最糟糕的是,它甚至没有显示错误。都是空白的/

我的数据库配置:

$active_group = 'default';
$active_record = TRUE;
$db['default']['hostname'] = MyIp;
$db['default']['username'] = 'MyUser';
$db['default']['password'] = 'myPass';
$db['default']['database'] = 'D:\folder\file.gdb';
$db['default']['port']      = 3050;
$db['default']['dbdriver'] = 'firebird';
$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;

我的配置有问题吗?

我发现了问题。我的lampp无法使用interbase.so,这是运行firebird(ibase_connect函数)所必需的,因此我安装了apache2。既然我可以得到“interbase.so”,现在我可以很好地连接了。顺便说一句,我在Ubuntu上运行


好了,就是这样^^

我发现了问题。我的lampp无法使用interbase.so,这是运行firebird(ibase_connect函数)所必需的,因此我安装了apache2。既然我可以得到“interbase.so”,现在我可以很好地连接了。顺便说一句,我在Ubuntu上运行


好了,就是这样^^

解决方案:Codeigniter版本3

    $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
    );

解决方案:Codeigniter版本3

    $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
    );
本地主机上的mydb=c:\path\to\db.fdb

$active_record=true

$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'SYSDBA';
$db['default']['password'] = 'masterkey';
$db['default']['database'] = 'dbname on localhost';
$db['default']['port']     = '3050';
$db['default']['dbdriver'] = 'ibase';
$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'] = true;
本地主机上的mydb=c:\path\to\db.fdb

$active_record=true

$db['default']['hostname'] = 'localhost';
$db['default']['username'] = 'SYSDBA';
$db['default']['password'] = 'masterkey';
$db['default']['database'] = 'dbname on localhost';
$db['default']['port']     = '3050';
$db['default']['dbdriver'] = 'ibase';
$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'] = true;