mysql dbcollat,致命错误:调用未定义的方法CI_DB_mysql_driver ::其中()

I just upgraded my version of CodeIgniter... I went through the config files and copied over any values that weren't in my existing configuration but were inside the new config files. I'm running into an error where Active Record isn't working and I'm unsure why. I'm trying to debug and trace it back to a problem within the code but am struggling. Any ideas on what I should do? My error is

Fatal error: Call to undefined method CI_DB_mysql_driver::where() in /scripts/htdocs/smartdox-libraries/smartdox/system/libraries/Session.php on line 201

CI's own session class is trying to use this function.

config/database.php

$active_group = "default";

$active_record = TRUE;

$db['default']['hostname'] = CPOD_DATABASE_SERVER;

$db['default']['username'] = CPOD_DATABASE_USER;

$db['default']['password'] = CPOD_DATABASE_PASSWORD;

$db['default']['database'] = CPOD_DATABASE;

$db['default']['dbdriver'] = "mysql";

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

After initial investigation it looks like having a "database" object loaded into CI's library auto load causes a DB object loaded with the $active_record value pulling in false.

解决方案

Did you add the datamapper bootstrap to the bottom of your index.php file? This fixed my problem.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值