dongzaheng4449 2017-11-10 04:50
浏览 51
已采纳

too long

With this binary (PHP 5.3.10-1ubuntu3.26) :

application/x-httpd-suphp="php:/usr/bin/php-cgi

I have no problem.

But when I try to use this one which is an higher version of php (PHP 5.5.38) :

application/x-httpd-suphp="php:/usr/local/bin/php-cgi"

I get a problem on my Cakephp 2.x application :

Error: A Database connection using "Mysql" was missing or unable to connect. The database server returned this error: Selected driver is not enabled

Error: Mysql driver is NOT enabled

Notice: If you want to customize this error message, create app/View/Errors/missing_connection.ctp

Stack Trace

CORE/Cake/Model/ConnectionManager.php line 105 → DboSource->__construct(array) CORE/Cake/Model/Model.php line 3626 → ConnectionManager::getDataSource(string) CORE/Cake/Model/Model.php line 1155 → Model->setDataSource(string) CORE/Cake/Model/Model.php line 3653 → Model->setSource(string) CORE/Cake/Model/Model.php line 3031 → Model->getDataSource() CORE/Cake/Model/Model.php line 3003 → Model->_readDataSource(string, array) APP/Controller/AppController.php line 87 → Model->find(string, array) APP/Controller/HomeController.php line 10 → AppController->beforeFilter() [internal function] → HomeController->beforeFilter(CakeEvent) CORE/Cake/Event/CakeEventManager.php line 243 → call_user_func(array, CakeEvent) CORE/Cake/Controller/Controller.php line 676 → CakeEventManager->dispatch(CakeEvent) CORE/Cake/Routing/Dispatcher.php line 189 → Controller->startupProcess() CORE/Cake/Routing/Dispatcher.php line 167 → Dispatcher->_invoke(HomeController, CakeRequest) APP/webroot/index.php line 115 → Dispatcher->dispatch(CakeRequest, CakeResponse)

Does someone have an idea to resolve this ?

Thank you,

  • 写回答

1条回答 默认 最新

  • douzhan8303 2017-11-10 05:00
    关注

    Check in the php.ini of your PHP5.5 installation weather the MySQL driver is loaded:

    extension=mysqli.so
    extension=mysql.so
    extension=pdo_mysql.so

    However, the original MySQL extension is in PHP5.5 deprecated, and will generate E_DEPRECATED errors when connecting to a database. Instead, use the MySQLi or PDO_MySQL extensions.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥15 请教:如何用postman调用本地虚拟机区块链接上的合约?
  • ¥15 为什么使用javacv转封装rtsp为rtmp时出现如下问题:[h264 @ 000000004faf7500]no frame?
  • ¥15 乘性高斯噪声在深度学习网络中的应用
  • ¥15 运筹学排序问题中的在线排序
  • ¥15 关于docker部署flink集成hadoop的yarn,请教个问题 flink启动yarn-session.sh连不上hadoop,这个整了好几天一直不行,求帮忙看一下怎么解决
  • ¥15 深度学习根据CNN网络模型,搭建BP模型并训练MNIST数据集
  • ¥15 C++ 头文件/宏冲突问题解决
  • ¥15 用comsol模拟大气湍流通过底部加热(温度不同)的腔体
  • ¥50 安卓adb backup备份子用户应用数据失败
  • ¥20 有人能用聚类分析帮我分析一下文本内容嘛