亚洲av成人无遮挡网站在线观看,少妇性bbb搡bbb爽爽爽,亚洲av日韩精品久久久久久,兔费看少妇性l交大片免费,无码少妇一区二区三区

  免費(fèi)注冊(cè) 查看新帖 |

Chinaunix

  平臺(tái) 論壇 博客 文庫
最近訪問板塊 發(fā)新帖
查看: 2161 | 回復(fù): 1
打印 上一主題 下一主題

Windows下安裝PEAR, PHPUnit成功 [復(fù)制鏈接]

論壇徽章:
0
跳轉(zhuǎn)到指定樓層
1 [收藏(0)] [報(bào)告]
發(fā)表于 2012-01-06 16:44 |只看該作者 |倒序?yàn)g覽
Windows下安裝PEAR, PHPUnit成功





環(huán)境要求:
Windows + APMServ5.2.6/PHP5以上

安裝步驟:
1、Windows的開始 -> 運(yùn)行 ->cmd

2、安裝命令

d:
cd D:\APMServ5.2.6\PHP
D:\APMServ5.2.6\PHP>go-pear.bat

Are you installing a system-wide PEAR or a local copy?
(system|local) [system] :  敲擊回車鍵 (Enter)

Below is a suggested file layout for your new PEAR installation.  To
change individual locations, type the number in front of the
directory.  Type ‘a(chǎn)ll’ to change all of them or simply press Enter to
accept these locations.

1. Installation base ($prefix)                   : D:\APMServ5.2.6\PHP
2. Temporary directory for processing            : D:\APMServ5.2.6\PHP\tmp
3. Temporary directory for downloads             : D:\APMServ5.2.6\PHP\tmp
4. Binaries directory                            : D:\APMServ5.2.6\PHP
5. PHP code directory ($php_dir)                 : D:\APMServ5.2.6\PHP\pear
6. Documentation directory                       : D:\APMServ5.2.6\PHP\docs
7. Data directory                                : D:\APMServ5.2.6\PHP\data
8. User-modifiable configuration files directory : D:\APMServ5.2.6\PHP\cfg
9. Public Web Files directory                    : D:\APMServ5.2.6\PHP\www
10. Tests directory                               : D:\APMServ5.2.6\PHP\tests
11. Name of configuration file                    : D:\APMServ5.2.6\PHP\pear.ini

12. Path to CLI php.exe                           : D:\APMServ5.2.6\PHP\.

1-12, ‘a(chǎn)ll’ or Enter to continue:   輸入all

Installation base ($prefix) [D:\APMServ5.2.6\PHP] :
Temporary directory for processing [$prefix\tmp] :
Temporary directory for downloads [$prefix\tmp] :
Binaries directory [$prefix] :
PHP code directory ($php_dir) [$prefix\pear] :
Documentation directory [$prefix\docs] :
Data directory [$prefix\data] :
User-modifiable configuration files directory [$prefix\cfg] :
Public Web Files directory [$prefix\www] :
Tests directory [$prefix\tests] :
Name of configuration file [D:\APMServ5.2.6\PHP\pear.ini] :
Path to CLI php.exe [D:\APMServ5.2.6\PHP\.] :

一直回車,即可

此時(shí)D:\APMServ5.2.6\PHP 會(huì)多出一個(gè)文件 pws-php5isapi.reg ,雙擊,確定,關(guān)閉控制臺(tái)窗口,新打開一個(gè)cmd。

D:\APMServ5.2.6\PHP>pear -V
PEAR Version: 1.7.1
PHP Version: 5.2.6
Zend Engine Version: 2.2.0
Running on: Windows NT 5EC44E99C71645F 5.1 build 2600

ok,安裝成功,不過別高興的太早了,還有升級(jí)呢…不然無法安裝后續(xù)的PHPUnit!



安裝PHPUnit
D:\APMServ5.2.6\PHP>pear list

INSTALLED PACKAGES, CHANNEL PEAR.PHP.NET:
=========================================
PACKAGE          VERSION STATE
Archive_Tar      1.3.3   stable
Console_Getopt   1.2.3   stable
Image_GraphViz   1.2.1   stable
Log              1.11.5  stable
PEAR             1.9.0   stable
Structures_Graph 1.0.3   stable
XML_Util         1.2.1   stable

沒有以上安裝包的請(qǐng)你先安裝,比如你沒有安裝Image_GraphViz 和Log,請(qǐng)輸入以下指令:

D:\APMServ5.2.6\PHP>pear install Image_GraphViz
D:\APMServ5.2.6\PHP>pear install Log

安裝成功后,再輸入以下指令:

D:\APMServ5.2.6\PHP>pear upgrade-all

Will upgrade channel://pear.php.net/archive_tar
Will upgrade channel://pear.php.net/structures_graph
Will upgrade channel://pear.php.net/pear
downloading Archive_Tar-1.3.3.tgz …
Starting to download Archive_Tar-1.3.3.tgz (18,119 bytes)
……done: 18,119 bytes
downloading Structures_Graph-1.0.3.tgz …
Starting to download Structures_Graph-1.0.3.tgz (30,191 bytes)
…done: 30,191 bytes
downloading PEAR-1.9.0.tgz …
Starting to download PEAR-1.9.0.tgz (291,634 bytes)
…done: 291,634 bytes
upgrade-all ok: channel://pear.php.net/Archive_Tar-1.3.3
upgrade-all ok: channel://pear.php.net/Structures_Graph-1.0.3
upgrade-all ok: channel://pear.php.net/PEAR-1.9.0
PEAR: Optional feature webinstaller available (PEAR’s web-based installer)
PEAR: Optional feature gtkinstaller available (PEAR’s PHP-GTK-based installer)
PEAR: Optional feature gtk2installer available (PEAR’s PHP-GTK2-based installer)

PEAR: To install optional features use “pear install pear/PEAR#featurename”

好的,如果你到達(dá)這一步,恭喜你成功即將離你不遠(yuǎn)。

D:\APMServ5.2.6\PHP>pear channel-discover pear.phpunit.de
D:\APMServ5.2.6\PHP>pear install phpunit/PHPUnit

我在執(zhí)行上面第二句安裝失敗:

Unknown remote channel: pear.symfony-project.com
Did not download optional dependencies: channel://pear.symfony-project.com/YAML,
use --alldeps to download automatically
phpunit/PHPUnit can optionally use package "channel://pear.symfony-project.com/Y
AML" (version >= 1.0.2)
phpunit/PHPUnit can optionally use PHP extension "soap"
phpunit/PHPUnit requires PHP extension "xdebug" (version >= 2.0.5), installed ve
rsion is 2.0.4
No valid packages found
install failed



原因是channel不通,還有xdebug版本過低,于是增加下面代碼

D:\xx\PHP>pear channel-discover pear.symfony-project.com
Adding Channel "pear.symfony-project.com" succeeded
Discovery of channel "pear.symfony-project.com" succeeded



D:\xx\PHP>pear channel-discover components.ez.no
Adding Channel "components.ez.no" succeeded
Discovery of channel "components.ez.no" succeeded

再到 http://xdebug.org/download.php 下載最新的 xdebug 仍到 ext 文件夾中,重啟apache,完成xdebug的升級(jí)。

之后在執(zhí)行安裝phpunit, 成功~







如果這兩個(gè)都沒有出錯(cuò)的話,D:\APMServ5.2.6\PHP目錄下會(huì)出現(xiàn)以下四個(gè)文件:

phpunit.bat
phpunit
dbunit.bat
dbunit

好了,檢測(cè)安裝是否成功。

校驗(yàn)安裝
D:\APMServ5.2.6\PHP>pear -V

PEAR Version: 1.9.0
PHP Version: 5.2.6
Zend Engine Version: 2.2.0
Running on: Windows NT 5EC44E99C71645F 5.1 build 2600

D:\APMServ5.2.6\PHP>phpunit –version

PHPUnit 3.4.5 by Sebastian Bergmann.

注意如果不成功的話,請(qǐng)使用

d:
cd D:\APMServ5.2.6\PHP
D:\APMServ5.2.6\PHP>phpunit.bat

另外為了避免每次這樣啟動(dòng),建議你講D:\APMServ5.2.6\PHP\phpunit.bat 加入環(huán)境變量PATH,dbunit亦如此。





轉(zhuǎn)載自LixiPHP

論壇徽章:
0
2 [報(bào)告]
發(fā)表于 2012-01-06 16:44 |只看該作者
謝謝分享
您需要登錄后才可以回帖 登錄 | 注冊(cè)

本版積分規(guī)則 發(fā)表回復(fù)

  

北京盛拓優(yōu)訊信息技術(shù)有限公司. 版權(quán)所有 京ICP備16024965號(hào)-6 北京市公安局海淀分局網(wǎng)監(jiān)中心備案編號(hào):11010802020122 niuxiaotong@pcpop.com 17352615567
未成年舉報(bào)專區(qū)
中國互聯(lián)網(wǎng)協(xié)會(huì)會(huì)員  聯(lián)系我們:huangweiwei@itpub.net
感謝所有關(guān)心和支持過ChinaUnix的朋友們 轉(zhuǎn)載本站內(nèi)容請(qǐng)注明原作者名及出處

清除 Cookies - ChinaUnix - Archiver - WAP - TOP