Installing PEAR and PHPUnit with xampp(使用 xampp 安装 PEAR 和 PHPUnit)
问题描述
I am trying to get PHPUnit up and running the following are the steps I am currently following:
### Install new PEAR Version needed for PHPUnit 3.X
### Download: http://pear.php.net/go-pear.phar Save it under C:xamppphp
Open a command prompt and go to C:xamppphp
Type "php go-pear.phar" (Installs new PEAR)
Type "pear update-channels" (updates channel definitions)
Type "pear upgrade --alldeps" (upgrades all existing packages and pear)
Type "pear channel-discover components.ez.no" (this is needed for PHPUnit)
Type "pear channel-discover pear.symfony-project.com" (also needed by PHPUnit)
Type "pear channel-discover pear.phpunit.de" (This IS phpunit)
Type "pear install --alldeps phpunit/PHPUnit" (installs PHPUnit and all dependencies)
This works up untill the point where I have to pear upgrade --alldeps
after downloading all the bits it needs i get:#
ERROR: failed to mkdir C:phppeardataAuthAuthFrontend
ERROR: failed to mkdir C:phppeardocsBenchmarkdoc
ERROR: failed to mkdir C:phppeardataCacheContainer
ERROR: failed to mkdir C:phppeardocsCache_Litedocs
ERROR: failed to mkdir C:phppeardocsCalendardocsexamples
ERROR: failed to mkdir C:phppeardocsConfigdocs
.....
My PHP directory is installed under C:xamppphp
What do I need to change so that it knows the correct place to add these directories/ files?
Thanks
It seems the issue is not with PHPUnit but with your pear installation in general.
The user you run the install with does not have the privileges to create the needed folders.
Ether fix those permissions or start the cmd prompt with admin privileges (windowsbutton & enter "cmd" then strg+shift+enter) and rerun the commands.
这篇关于使用 xampp 安装 PEAR 和 PHPUnit的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:使用 xampp 安装 PEAR 和 PHPUnit


- Mod使用GET变量将子域重写为PHP 2021-01-01
- 正确分离 PHP 中的逻辑/样式 2021-01-01
- 从 PHP 中的输入表单获取日期 2022-01-01
- 带有通配符的 Laravel 验证器 2021-01-01
- 如何定位 php.ini 文件 (xampp) 2022-01-01
- PHP Count 布尔数组中真值的数量 2021-01-01
- 没有作曲家的 PSR4 自动加载 2022-01-01
- Laravel 仓库 2022-01-01
- Oracle 即时客户端 DYLD_LIBRARY_PATH 错误 2022-01-01
- SoapClient 设置自定义 HTTP Header 2021-01-01