国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 語言 > PHP > 正文

在 WampServer 上手工安裝 PHP 的多個版本的方法分享

2024-07-15 01:59:37
字體:
來源:轉載
供稿:網友
對于PHP不同版本的需求,PHP程序員都最清楚不過了。
WampServer的Version菜單(Apache、PHP、Mysql各自有一個Version菜單)上,有一個 Get More... 連接,點擊它就可以到官網上下載你需要的版本,安裝是自動化的,非常簡單。但是,到我寫本文為止,官網的PHP5.2最高為5.2.11,PHP5.3最高為5.3.1。5.2最穩定的5.2.17、5.3最新的5.3.8都沒有提供,而且更新非常慢。沒有我們需要的版本,怎么辦?毛大爺說過一句至理名言:自己動手,豐衣足食!
手工安裝新版本的PHP,只需以下步驟:
下載要安裝的PHP版本。既然是用WampServer,那當然是下載Window版本的ZIP包啦:http://windows.php.net。解壓到 Wamp的安裝目錄/bin/php/php5.2.17。這里以5.2.17為例。
進入 Wamp的安裝目錄/bin/php/php5.2.17 目錄,從 php.ini-dist 或者 php.ini-recommended 復制一份,重命名為php.ini,適應修改php.ini配置(如extension_dir),再從php.ini復制一分,重命名為 phpForApache.ini。
從已有的版本目錄中復制一份 wampserver.conf。比如我安裝WampServer的時候已經有php5.3.0,在 Wamp的安裝目錄/bin/php/php5.3.0 目錄下復制 wampserver.conf 到 Wamp的安裝目錄/bin/php/php5.2.17。
修改Wamp配置文件:進入 Wamp的安裝目錄,用IDE或記事本(最好使用行號定位的記事本,如EditPlus等)打開 wampmanager.ini,定位到 335 行,通常在這一行就是[phpVersion],如果不是,則在附近找找。復制下面一行:
Type: item; Caption: "5.3.0"; Action: multi; Actions:switchPhp5.3.0
插入到這一行前面,并修改為
Type: item; Caption: "5.2.17"; Action: multi; Actions:switchPhp5.2.17
再復制
[switchPhp5.3.0]
Action: service; Service: wampapache; ServiceAction: stop; Flags: ignoreerrors waituntilterminated
Action: run; FileName: "Wamp的安裝目錄/bin/php/php5.3.0/php-win.exe";Parameters: "switchPhpVersion.php 5.3.0";WorkingDir: "Wamp的安裝目錄/scripts"; Flags: waituntilterminated
Action: run; FileName: "Wamp的安裝目錄/bin/php/php5.3.0/php-win.exe";Parameters: "-c . refresh.php";WorkingDir: "Wamp的安裝目錄/scripts"; Flags: waituntilterminated
Action: run; FileName: "net"; Parameters: "start wampapache"; ShowCmd: hidden; Flags: waituntilterminated
Action: resetservices
Action: readconfig;
插入這一段之前,并修改為
[switchPhp5.2.17]
Action: service; Service: wampapache; ServiceAction: stop; Flags: ignoreerrors waituntilterminated
Action: run; FileName: "Wamp的安裝目錄/bin/php/php5.3.0/php-win.exe";Parameters: "switchPhpVersion.php 5.2.17";WorkingDir: "Wamp的安裝目錄/scripts"; Flags: waituntilterminated
Action: run; FileName: "Wamp的安裝目錄/bin/php/php5.3.0/php-win.exe";Parameters: "-c . refresh.php";WorkingDir: "Wamp的安裝目錄/scripts"; Flags: waituntilterminated
發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 汝城县| 西青区| 库车县| 华阴市| 清新县| 北辰区| 昌图县| 宜昌市| 穆棱市| 石嘴山市| 蓝田县| 容城县| 博湖县| 长武县| 金门县| 霸州市| 定安县| 叙永县| 东宁县| 凤庆县| 天长市| 德庆县| 崇信县| 遵义市| 砀山县| 罗田县| 石林| 井冈山市| 威宁| 玉溪市| 宁蒗| 乡宁县| 嵩明县| 西充县| 九台市| 绍兴县| 嘉义市| 中方县| 大石桥市| 凤翔县| 临江市|