- 浏览: 157296 次
- 性别:
- 来自: 广西
文章分类
最新评论
-
zhuyanjavaeye:
crash_log_path 这个配置是怎么用的?为什么我配置 ...
sphinx(或coreseek)配置文件记录 -
bingxiaotian:
利用memcached做实时分页缓存 -
yehayeah:
楼主说得很好
程序员到底怎么了?
环境要求:
Windows + APMServ5.2.6/PHP5以上
安装步骤:
1、Windows的开始 -> 运行 ->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 ‘all’ 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, ‘all’ 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\.] :
一直回车,即可
此时D:\APMServ5.2.6\PHP 会多出一个文件 pws-php5isapi.reg ,双击,确定,关闭控制台窗口,新打开一个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,安装成功,不过别高兴的太早了,还有升级呢…不然无法安装后续的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
没有以上安装包的请你先安装,比如你没有安装Image_GraphViz 和Log,请输入以下指令:
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:\APMServ5.2.6\PHP>pear channel-discover pear.phpunit.de
D:\APMServ5.2.6\PHP>pear install phpunit/PHPUnit
我在执行上面第二句安装失败:
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的升级。
之后在执行安装phpunit, 成功~
如果这两个都没有出错的话,D:\APMServ5.2.6\PHP目录下会出现以下四个文件:
phpunit.bat
phpunit
dbunit.bat
dbunit
好了,检测安装是否成功。
校验安装
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.
注意如果不成功的话,请使用
d:
cd D:\APMServ5.2.6\PHP
D:\APMServ5.2.6\PHP>phpunit.bat
另外为了避免每次这样启动,建议你讲D:\APMServ5.2.6\PHP\phpunit.bat 加入环境变量PATH,dbunit亦如此。
发表评论
-
编译php5.4及安装后添加扩展
2014-02-25 20:30 12084今天因为研发需要php5.4 没有相应的RPM包,所以只能下 ... -
php程序性能分析工具
2014-02-20 11:40 3165平常开发一些效率要 ... -
ubuntu 安装 gearman
2013-10-24 16:25 6307安装过程为:1. 下载wget http://launch ... -
正则表达式--匹配不包含某一个字符串的方法
2013-09-27 19:38 1096如下图 (((?!\.htm).)*) 为匹配不包含 .ht ... -
制作joomla的批量导入文章组件
2012-12-11 15:30 1791近期做SEO,需要对一个joomla做的站点批量导 ... -
提高coreseek的搜索精度
2012-11-19 11:28 5994由于coreseek带的mmseg默认词库只有1w多个字词,搜 ... -
discuzx2.5 分区 SEO设置
2012-09-28 19:42 1313由于DiscuzX2.5后台没有分区的SEO设置,只能自己动手 ... -
PROCEDURE can’t return a result set in the given context
2012-08-29 12:11 3036PROCEDURE db.procedure_name ... -
php连接coreseek
2012-08-29 09:48 4499<?php include_once ... -
优化 PHP 代码建议
2012-08-28 09:40 9011、如果能将类的方法定义成static,就尽量定义成stati ... -
coreseek无法索引中文
2012-08-27 17:28 1475按照官方的指导完成coreseek的安装,并成功创建了索引, ... -
joomla放置任意文章到页面模块
2012-04-11 18:20 1977像企业站点经常会想把手动指定的文章放置到页面侧本栏目 ... -
joomla 注意事项
2012-03-23 17:04 8481. 在模块中字段定义的变量不要使用 $content,因为在 ... -
joomla模板的应用
2012-03-22 15:05 1407在做站时,经常会遇到同属分类级别但使用不同模板的情况。 ... -
php魔术方法: __get() 和 __set()的妙用
2012-03-11 18:01 2901<?php class Post { pr ... -
joomla结构分析 - 页面模块加载
2012-03-11 17:34 0joomla在页面中加载模块的方法是在页面中写 <j ... -
joomla结构分析 - 工厂模式
2012-03-10 17:10 1232joomla中工厂模式的使用: 文件 libraries/j ... -
linux安装 MCrypt 模块
2012-02-28 17:52 2765What is MCrypt? MCrypt is a ... -
识别验证码方法
2011-12-30 14:41 8920验证码的功能一般是防止使用程序恶意注册、暴力破解或批量发帖而设 ... -
discuz防灌水机制
2011-12-23 14:49 2299最近论坛频遭灌水机灌水,在不影响用户体验的情况下,需设 ...
相关推荐
安装pear,phpunit,所有的错误,帮助你解决难题。
PHP5.4.3 下安装PEAR、PHPUnit、phpDoc2...
windows下安装pear及phpunit(注意配置好php命令行环境),需要的朋友可以参考下。
详细的安装教程 自己应经测试的出来的 放心下载
您可能感兴趣的文章:PHP Pear 安装及使用windows下安装pear及phpunit(注意配置好php命令行环境)PHP 5.0 Pear安装方法PHP pear安装配置教程pear包安装phpunit的方法windows下安装PEAR php5.3.1下解决出错的方法...
PHPUnit可以通过PHP扩展和程序库(PEAE)获得。 PEAR是可重用PHP组件的框架和分发系统。 安装PHPUnit可以通过PEAR安装程序命令... 尽管使用PEAR安装程序是PHPUnit唯一支持的安装方法,但你还是可以手工安装。 要手工
PHP环境中安装pear、phpunit以及xdebug全攻略,大家参考使用吧
主要介绍了Windows下安装PHP单元测试环境PHPUnit图文教程,按照本文操作即可在Windows下安装成功PHPUnit,需要的朋友可以参考下
版本很老,留存备份。对windows环境错了容错处理。不要下载,请绕行
pear install phpunit/PHPUnit 方法二 :手动安装 1 从http://pear.phpunit.de/get/下载软件包并解压 2 把解压后的目录加入php.ini中的include_path 3 将脚本pear-phpunit改名为phpunit 4 将phpunit脚本中的@...
NULL 博文链接:https://vtrtbb.iteye.com/blog/2322089
Windows平台LAMP环境XAMPP 1.7.3下如何安装PHPUnit呢? 首先,以管理员身份运行cmd,使用pear添加phpunit频道: D:\xampp\php>pear channel-discover pear.phpunit.de Channel “pear.phpunit.de” is already ...
PHPUnit是一个轻量级的PHP测试框架。它是在PHP5下面对JUnit3系列版本的完整移植
PHPUnit是zend官方大力...windows下将php的环境变量加入到PATH环境变量中。 简单使用: 复制代码 代码如下: <?php class StackTest extends PHPUnit_Framework_TestCase { public function testArray() {
因为需要安装 PHPUnit,要先装 pear,网上的教程大多数是以双击 go-pear.bat 开始,但是我安装的php文件夹里压根没有这个文件。 经过几次搜索之后终于找到了办法,解决步骤如下: 1、下载下面连接的文件至 go-pear....
如果你在用PHPUNIT会报 include(PHPUnit_Extensions_Story_TestCase.php): failed to open stream: No such file or directory include(PHPUnit_Extensions_Database_TestCase.php): failed to open stream: No such...
本文实例讲述了Windows下wamp php单元测试工具PHPUnit安装及生成日志文件配置方法。分享给大家供大家参考,具体如下: phpunit下载网站 http://www.phpunit.cn/ 一、安装PHPUnit 1.选择版本 我用的是php版本是5.6.25...
本文实例讲述了CentOS环境下安装PHPUnit的方法。分享给大家供大家参考,具体如下: PHPUnit之于PHP正如JUnit之于Java,是PHP程序员用来写单元测试代码的工具。由于上级要求员工写代码时也要写单元测试代码,于是我在...