douqiao3930 2019-03-10 10:57
浏览 146

Codeigniter迁移mysql到mysqli连接错误

Long time reader, first time poster,

I found this error pinging a webservice from my app after doing a migration to php 7.2 hosting environment from 5.6:

PHP Fatal error:  Uncaught Error: Call to undefined function mysql_connect() in …system/database/drivers/mysql/mysql_driver.php

After some research, this looked like a simple one line fix in codeigniter framework from: $db['default']['dbdriver'] = 'mysql'; to:

$db['default']['dbdriver'] = 'mysqli';

When I make a server request from the app after this change, my error log returns nothing but is still not loading in the app as before. I have read other posts on the topic suggesting I would need to make other mysql->mysqli changes, tried doing this in driver files also with no luck.

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥20 双层网络上信息-疾病传播
    • ¥50 paddlepaddle pinn
    • ¥15 Stata 面板数据模型选择
    • ¥20 idea运行测试代码报错问题
    • ¥15 网络监控:网络故障告警通知
    • ¥15 django项目运行报编码错误
    • ¥15 请问这个是什么意思?
    • ¥15 STM32驱动继电器
    • ¥15 Windows server update services
    • ¥15 关于#c语言#的问题:我现在在做一个墨水屏设计,2.9英寸的小屏怎么换4.2英寸大屏