在 XAMPP for Windows 中升级 PHP 5.4.0?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/9930056/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-26 07:56:08  来源:igfitidea点击:

Upgrading PHP 5.4.0 in XAMPP for Windows?

phpwindowsxamppinstallation

提问by sugunan

I want to upgrade to PHP 5.4.0 in XAMPP. I'm using windows operating system. I searched on web, but there was no proper guide for this as it was released recently.

我想在 XAMPP 中升级到 PHP 5.4.0。我正在使用 Windows 操作系统。我在网上搜索,但没有适当的指南,因为它最近发布。

Can anyone give me some instructions on how to upgrade to PHP 5.4.0 in XAMPP (windows)?

谁能给我一些关于如何在 XAMPP (windows) 中升级到 PHP 5.4.0 的说明?

回答by jarchuleta

  1. Download the latest binary version of PHP(make sure to get the .zip package not the installer)
  2. De-archive it to a directory
  3. Copy the contents of the directory in the php subfolder of your XAMPP installation directory, overwriting the files which are already present
  4. Overwrite the files which are already present in the apache\bin directory with the newer versions.
  5. 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.
  1. 下载最新的 PHP 二进制版本(确保获取 .zip 包而不是安装程序)
  2. 将其解压缩到一个目录
  3. 复制XAMPP安装目录的php子文件夹中目录的内容,覆盖已经存在的文件
  4. 用较新的版本覆盖 apache\bin 目录中已经存在的文件。
  5. 现在的诀窍是:将名称中包含“_2”的文件(例如 php5apache2_2.dll 或 php5apache2_2_filter.dll)复制到 apache\bin 子目录中并删除“_2”部分,覆盖现有文件。这是必要的,因为 XAMPP 使用 Apache 2.2 版,并且带有 2 前缀的文件是为 Apache 2.0 构建的,因此您必须为较新版本(具有不同的插件接口)构建文件,并在 XAMPP 期望的文件名中重命名它们.

Source

来源

回答by user93829

I found a working php_uploadprogress.dll extension for xampp windows with php 5.4 here:

我在这里找到了一个适用于 php 5.4 的 xampp 窗口的有效 php_uploadprogress.dll 扩展:

http://www.fsbcomputers.com/php_uploadprogress

http://www.fsbcomputers.com/php_uploadprogress

there are 32 and 64 bit versions as well as a preview for php 5.5.

有 32 位和 64 位版本以及 php 5.5 的预览版。

By the way, the php build numbers, apache /xampp refers to are:

顺便说一下,php 内部版本号,apache /xampp 指的是:

PHP 5.2: 20060613 PHP 5.3: 20090626 PHP 5.4: 20100525

PHP 5.2:20060613 PHP 5.3:20090626 PHP 5.4:20100525

回答by user93829

I have done the upgrade in ubuntu. Following are the steps to do the upgrade.

我已经在 ubuntu 中完成了升级。以下是执行升级的步骤。

sudo add-apt-repository ppa:ondrej/php5
sudo apt-get update
sudo apt-get install php5
sudo /etc/init.d/apache2 restart

回答by icomrade

I hope that you are still following this, I installed php 5.4 on the latest xampp stable with no problem. Fortunately for you, there is a beta update of xampp which makes life easier. http://www.apachefriends.org/en/xampp-beta.html

我希望你仍然关注这个,我在最新的 xampp stable 上安装了 php 5.4,没有问题。幸运的是,xampp 有一个测试版更新,它使您的生活更轻松。http://www.apachefriends.org/en/xampp-beta.html

Just make sure to make a complete backup of your old xampp directory, and export your old databases so you can import them into your new (updated) mysql installation. Alternatively you do not need to update mysql, I use this beta and I can say that it's pretty solid.

只需确保对旧的 xampp 目录进行完整备份,并导出旧的数据库,以便将它们导入到新的(更新的)mysql 安装中。或者你不需要更新 mysql,我使用这个测试版,我可以说它非常可靠。

EDIT: The pop-up warning were a problem that I had too, I recommend using the latest beta. But, you can fix the errors and use php 5.4 on your old install (not recommended) by commenting out the following line in php.ini

编辑:弹出警告也是我遇到的一个问题,我建议使用最新的测试版。但是,您可以通过在 php.ini 中注释掉以下行来修复错误并在旧安装上使用 php 5.4(不推荐)

extension=php_oci8.dll

Change to

改成

;extension=php_oci8.dll