firebird - codeigniter连接 [英] firebird - codeigniter connection

查看:113
本文介绍了firebird - codeigniter连接的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚将我的项目从我的笔记本电脑移动到本地服务器,这是Linux Fedora。
我的项目工作正常,当我在我的笔记本电脑
,但是当我把它移动到本地服务器
它给我这个错误。

i just moved my project from my laptop to the local server, which is Linux Fedora. my project was working fine when i run it on my laptop but when i moved it to the local server it gave me this error.


无法使用提供的设置连接到数据库服务器。

Unable to connect to your database server using the provided settings.

文件名:core / Loader.php

Filename: core/Loader.php

行号:338

我试过使用本地php ibase_connect
,此错误

i tried using native php ibase_connect and it's throwing this error


无法完成主机192.168.4.141的网络请求。无法
建立连接。在/var/www/html/connect_firebird.php

Unable to complete network request to host "192.168.4.141". Failed to establish a connection. in /var/www/html/connect_firebird.php

这里是config / database.php文件中的数据库设置

here's the db setting in config/database.php file

$db['sdisdb']['hostname'] = "192.168.4.141";
$db['sdisdb']['username'] = "sysdba";
$db['sdisdb']['password'] = "masterkey";    
$db['sdisdb']['database'] = "D:\path\to\database.fdb";
$db['sdisdb']['dbdriver'] = "firebird";
$db['sdisdb']['port']    = 3050;
$db['sdisdb']['dbprefix'] = "";
$db['sdisdb']['pconnect'] = FALSE;
$db['sdisdb']['db_debug'] = TRUE;
$db['sdisdb']['cache_on'] = FALSE;
$db['sdisdb']['cachedir'] = "";
$db['sdisdb']['char_set'] = "utf8";
$db['sdisdb']['dbcollat'] = "utf8_general_ci";

我的配置有什么问题吗?

anything wrong with my config?

推荐答案

解决方案:Codeigniter版本3
application / config / database.php

Solution: Codeigniter version 3 application/config/database.php

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

这篇关于firebird - codeigniter连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆