如何更新XAMPP的PHP版本 [英] How can I update my version of PHP for XAMPP

查看:715
本文介绍了如何更新XAMPP的PHP版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可能重复:
要在Windows的XAMPP中升级PHP吗?

Possible Duplicate:
Upgrading PHP in XAMPP for Windows?

我当前正在使用XAMPP版本1.8.1,该版本具有PHPversion 5.4.3

I am currently using XAMPP version 1.8.1 which has the PHPversion 5.4.3

我从一天前发布的PHP站点版本5.4.11中找到了最新版本的PHP.

I have found the latest version of PHP from the PHP site version 5.4.11, released a day ago.

现在,如果我从php.net下载最新的PHP版本,并用最新的PHP目录替换当前的PHP目录,它将立即正常运行吗?

Now if I download the latest PHP version from php.net and replace my current PHP directory with the latest, will it work properly/ straight away?

谢谢

推荐答案

  • 下载 PHP 5.4.11 的最新二进制版本(确保获取.zip而不是安装程序)
  • 将其解存档到目录
  • 将目录的内容复制到XAMPP安装目录的php子文件夹中,覆盖已存在的文件
  • 使用较新的版本覆盖apache \ bin目录中已经存在的文件.
  • 诀窍::使用名称中带有"_2"的文件(例如php5apache2_2.dll或php5apache2_2_filter.dll),将其复制到apache \ bin子目录中,然后删除"_2部分,覆盖现有文件.这是必要的,因为XAMPP使用Apache 2.2版,并且带有2前缀的文件是为Apache 2.0构建的,因此,您必须为较新版本(具有不同的插件接口)构建文件,然后将其重命名为XAMPP期望的文件名.
    • Download the latest binary version of PHP 5.4.11 (make sure to get the .zip package not the installer)
    • De-archive it to a directory
    • Copy the contents of the directory in the php subfolder of your XAMPP installation directory, overwriting the files which are already present
    • Overwrite the files which are already present in the apache\bin directory with the newer versions.
    • Now the trick: take the files which have a "_2" in their names (for example php5apache2_2.dll or php5apache2_2_filter.dll), copy them in the apache\bin subdirectory and remove the "_2" part, overwriting the existing files. This is necessary because by XAMPP uses Apache version 2.2 and the files with the 2 prefix are built for Apache 2.0, so you must take the files build for the newer version (which has a different plugin interface) and rename them in the filenames XAMPP expects.
    • 希望这会有所帮助.

      这篇关于如何更新XAMPP的PHP版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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