首页 > 解决方案 > 在 XAMPP 中将 PHP 7.0.9 升级到 PHP 7.0.30 后 Apache 未启动

问题描述

现在,我的 xampp 有 php 7.0.9 版本。现在,我想将它升级到 php 7.0.30。因此,根据互联网上共享的指南和教程,我已从以下 URL 下载线程安全的 64 位 php 7.0.30:

从这里下载 PHP 7.0.30

并将此文件夹放入 xampp 文件夹。在此之后,我更新了 xampp 配置文件。

完成上述所有步骤后,当我尝试重新启动/启动 apache 时,它​​没有启动并显示以下错误:

Error: Apache shutdown unexpectedly.
5:47:27 PM  [Apache]    This may be due to a blocked port, missing dependencies, 
5:47:27 PM  [Apache]    improper privileges, a crash, or a shutdown by another method.
5:47:27 PM  [Apache]    Press the Logs button to view error logs and check
5:47:27 PM  [Apache]    the Windows Event Viewer for more clues
5:47:27 PM  [Apache]    If you need more help, copy and post this
5:47:27 PM  [Apache]    entire log window on the forums  

即使在关闭我的 SKYPE 但仍未启动后,我也尝试启动 Apache。

谁能帮我解决这个问题?

标签: xamppphp-7

解决方案


与其从 php.net 下载,不如直接从sourceforge下载 XAMPP 的便携式版本。然后,您可以从下载的 zip 中获取 php 目录,并(在重命名当前 php 目录后)将其复制到 xampp 目录中。

我发现我还必须将 ng2http2.dll 和 libssh2.dll 从(新)php 目录复制到 xampp/apache/bin 目录(再次重命名旧文件后)。

在快速检查新的 php.ini 文件并启动 XAMPP 服务器后,我的本地站点加载了新版本。

以上对我在 Windows 10 上从 PHP 7.0.x 升级到 7.1.x 有用。


推荐阅读