Upgrade PHP from version 5.2 to 5.3

﹥>﹥吖頭↗ 提交于 2019-12-01 02:35:20

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.

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).

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.

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"

instead of:

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

If you take a look at Upgrading to PHP 5.3 - an easy way, i think that will solve your problem, but if you're in a Linux machine that you can use apt-get the only thing that you need to do is:

$ sudo apt-get upgrade php php-* mysql-*
$ /etc/init.d/httpd restart

Regards.

The main thing I've run into is a mess of new E_DEPRECATED notices when doing anything from PEAR. Like the other comments, you'll want to adjust your error reporting levels appropriately.

Another thing to notice is that if you're upgrading from a package management system like macports or apt, some of the config layouts have changed and you'll have to adapt there.

Other than that, there aren't a lot of functional differences between 5.2 and 5.3.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!