Rumah >pembangunan bahagian belakang >tutorial php >升级WampServer支持PHP7 wampserver 2.5 wampserver不能启动 wampserver升级php
1. 把升级包解压后覆盖原文件 (http://aviatechno.net/files/wamp2.5.18_oto.zip)
2. 修改 wamp\wampmanager.conf
文件:
defaultLanguage = english
后面添加[options] urlAddLocalhost = "off" ChangeServicesNames = "off" MenuItemOnline = "off" HomepageAtStartup = "off" ProjectSubMenu = "off" VirtualHostSubMenu = "on"
apacheServiceRemoveParams = "-n wampapache64 -k uninstall"
后面添加<code><span>[apacheoptions]</span> apachePortUsed = <span>"80"</span> apacheUseOtherPort = <span>"off"</span></code>
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['phpIniDir'] = '.'; $phpConf['phpExeDir'] = '.'; $phpConf['phpConfFile'] = 'php.ini'; //$phpConf['apache']['2.2']['LoadModuleName'] = 'php5_module'; //$phpConf['apache']['2.2']['LoadModuleFile'] = 'php5apache2_2.dll'; //$phpConf['apache']['2.2']['AddModule'] = ''; $phpConf['apache']['2.4']['LoadModuleName'] = 'php7_module'; $phpConf['apache']['2.4']['LoadModuleFile'] = 'php7apache2_4.dll'; $phpConf['apache']['2.4']['AddModule'] = ''; ?>
7. 重启Wamp或者刷新Wamp(如下图1,在Wamp图标上点右键选择“Refresh”)即切换到PHP7版本(如下图2)
以上就介绍了升级WampServer支持PHP7,包括了wampserver方面的内容,希望对PHP教程有兴趣的朋友有所帮助。