将 PHP 从 5.2 版本升级到 5.3 [英] Upgrade PHP from version 5.2 to 5.3

查看:52
本文介绍了将 PHP 从 5.2 版本升级到 5.3的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直在使用 PHP 5.2 版,现在需要升级到 5.3 版(Windows/Apache).我已经使用 5.2 一段时间了,并且在 php.ini 中自定义了很多东西并添加了一些额外的扩展.

I've been using PHP version 5.2 and now need to upgrade to version 5.3 (Windows/Apache). I have been using 5.2 for awhile now and have customized many things in php.ini and added some extra extensions.

如何升级到 5.3 版而无需重新配置所有内容?还是升级需要我重新自定义我的 PHP 安装?

How can I upgrade to version 5.3 without having to reconfigure everything? Or does upgrading require that I customize my PHP installation all over again?

谢谢,布赖恩

推荐答案

过渡不一定容易,但也不难.PHP 5.3 给内部 Zend API 带来了一些变化,所以一些 PHP 扩展需要升级(我不得不升级 xDebug).这意味着您需要找到相应的 DLL,这可能并不容易,具体取决于您当前的设置.

The transition is not necessarily easy, but not hard also. PHP 5.3 brings some changes to the internal Zend API, so some PHP extension need to be upgraded (I had to upgrade xDebug). That means that you need to find the respective DLLs, which may not be that easy, depending on your current setup.

配置文件 php.ini 几乎相同.实际上,您实际上必须删除一些东西(例如不再需要 extension=php_pdo.dll).

The config file, php.ini, is pretty much the same. You will actually have to take some things out actually (for example extension=php_pdo.dll is not needed anymore).

只需从命令行执行 php -m 并查看抛出哪些错误.我刚刚从 5.2 版本中复制粘贴了 php.ini 文件,并在几分钟内完成了 5.3 的配置.

Just execute php -m from command line and see what errors are thrown. I have just copy-pasted the php.ini file from a 5.2 release and was done configuring 5.3 in a couple of minutes.

我在上面几行中提到了 xDebug.如果你使用它,你应该知道现在激活 xDebug 的那一行是:

I mentioned xDebug a few lines above. If you use it, you should know that the line which activates xDebug is now:

zend_extension = "path\to\PHP 5.3.0\ext\php_xdebug.dll"

代替:

zend_extension_ts = "path\to\PHP 5.3.0\ext\php_xdebug.dll"

这篇关于将 PHP 从 5.2 版本升级到 5.3的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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