如何保持PHP 5.5但使用5.4(CodeIgniter不推荐) [英] How to keep PHP 5.5 but use 5.4 (CodeIgniter deprecated)

查看:189
本文介绍了如何保持PHP 5.5但使用5.4(CodeIgniter不推荐)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个运行ISPConfig 3的专用服务器。
它来自Debian 7(正式PHP 5.4)。
我已经升级到PHP 5.5。

I have a dedicated server running with ISPConfig 3. It came under Debian 7 (officially PHP 5.4). I have upgraded it to PHP 5.5.

然而,我没有意识到CodeIgniter需要mysql驱动程序运行...因此,我的网站不再工作。

However, I didn't realize that CodeIgniter needs the mysql driver to run... Therefore, my website doesn't work anymore.

所以,我找到一种方法使用PHP 5.4只在一个网站(不影响其他运行在PHP 5.5下)或者我找到一种方法升级CodeIgniter所以它不再使用已弃用的mysql扩展。

So either I find a way to use PHP 5.4 only on a website (without affecting the others running under PHP 5.5) or I find a way to "upgrade" CodeIgniter so it doesn't use the deprecated mysql extension anymore.

推荐答案

我相信你可以做这个简单的更改 config / database.php

I believe you can make this simple change to config/database.php

更改

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

到:

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

由于CI使用数据库抽象层,所以应该是透明的。

As CI uses a database abstraction layer, this should be transarent.

这篇关于如何保持PHP 5.5但使用5.4(CodeIgniter不推荐)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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