Rumah >pembangunan bahagian belakang >tutorial php >升级WampServer支持PHP7 wampserver 2.5 wampserver不能启动 wampserver升级php

升级WampServer支持PHP7 wampserver 2.5 wampserver不能启动 wampserver升级php

WBOY
WBOYasal
2016-07-29 08:53:511999semak imbas

1. 把升级包解压后覆盖原文件 (http://aviatechno.net/files/wamp2.5.18_oto.zip)

2. 修改 wamp\wampmanager.conf 文件:

a. 在 defaultLanguage = english 后面添加

[options]
urlAddLocalhost = "off"
ChangeServicesNames = "off"
MenuItemOnline = "off"
HomepageAtStartup = "off"
ProjectSubMenu = "off"
VirtualHostSubMenu = "on"

b. 在 apacheServiceRemoveParams = "-n wampapache64 -k uninstall" 后面添加

<code><span>[apacheoptions]</span>
apachePortUsed = <span>"80"</span>
apacheUseOtherPort = <span>"off"</span></code>

c. 在 mysqlServiceRemoveParams = "--remove wampmysqld64" 后面添加

[mysqloptions]
mysqlPortUsed = "3306"
mysqlUseOtherPort = "off"

3. 重启Wamp即已经升级到2.5.18版了,此时已经支持PHP7了

4. 到 PHP官网 下载最新的PHP7 for Windows 的 Thread Safe 的zip包,解压到 wamp\bin\php 目录下

5. 复制php.ini-development并重命名为phpForApache.ini,修改该配置以符合您的要求

6. 从其他PHP版本目录拷贝wampserver.conf到PHP7目录下并修改成以下样子(或者用以下内容创建一个wampserver.conf文件):

<?php $phpConf[&#39;phpIniDir&#39;] = &#39;.&#39;;
$phpConf[&#39;phpExeDir&#39;] = &#39;.&#39;;
$phpConf[&#39;phpConfFile&#39;] = &#39;php.ini&#39;;

//$phpConf[&#39;apache&#39;][&#39;2.2&#39;][&#39;LoadModuleName&#39;] = &#39;php5_module&#39;;
//$phpConf[&#39;apache&#39;][&#39;2.2&#39;][&#39;LoadModuleFile&#39;] = &#39;php5apache2_2.dll&#39;;
//$phpConf[&#39;apache&#39;][&#39;2.2&#39;][&#39;AddModule&#39;] =  &#39;&#39;;
$phpConf[&#39;apache&#39;][&#39;2.4&#39;][&#39;LoadModuleName&#39;] = &#39;php7_module&#39;;
$phpConf[&#39;apache&#39;][&#39;2.4&#39;][&#39;LoadModuleFile&#39;] = &#39;php7apache2_4.dll&#39;;
$phpConf[&#39;apache&#39;][&#39;2.4&#39;][&#39;AddModule&#39;] =  &#39;&#39;;

?>

7. 重启Wamp或者刷新Wamp(如下图1,在Wamp图标上点右键选择“Refresh”)即切换到PHP7版本(如下图2)

以上就介绍了升级WampServer支持PHP7,包括了wampserver方面的内容,希望对PHP教程有兴趣的朋友有所帮助。

Kenyataan:
Kandungan artikel ini disumbangkan secara sukarela oleh netizen, dan hak cipta adalah milik pengarang asal. Laman web ini tidak memikul tanggungjawab undang-undang yang sepadan. Jika anda menemui sebarang kandungan yang disyaki plagiarisme atau pelanggaran, sila hubungi admin@php.cn