简体   繁体   English

无法使用Xampp在我的Windows系统上安装PHPUnit和Pear软件包

[英]Unable to install PHPUnit and Pear Packages on My Windows System using Xampp

When am installing the phpunit below error being displayed 在安装下面的phpunit时显示错误

'D:\XAMPP\htdocs\Selenium_Test>pear install phpunit.de/PHPUnit 
Attempting to discover channel "phpunit.de"...
Attempting fallback to https instead of http on channel "phpunit.de"...
unknown channel "phpunit.de" in "phpunit.de/PHPUnit"
invalid package name/package file "phpunit.de/PHPUnit"
install failed'

And also for Channel is: 对于Channel也是如此:

'D:\XAMPP\php>pear channel-discover pear.phpunit.de
Discovering channel pear.phpunit.de over http:// failed with message: channel-ad
d: Cannot open "http://pear.phpunit.de/channel.xml" (File http://pear.phpunit.de
:80/channel.xml not valid (received: HTTP/1.1 410 Gone))
Trying to discover channel pear.phpunit.de over https:// instead
Discovery of channel "pear.phpunit.de" failed (channel-add: Cannot open "https://pear.phpunit.de/channel.xml" (Connection to `pear.phpunit.de:443' failed: 
A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.))'

As soon as possible please help me with this problem. 请尽快解决这个问题。

The PEAR installation Method is abbandoned (as described here ). PEAR的安装方法是abbandoned(如所描述的在这里 )。

Follow the instruction for install on windows here . 按照此处在Windows上安装的说明进行操作。

A simply way is: 一种简单的方法是:

  1. Download the phpunit.phar here and save in the current directory folder. 此处下载phpunit.phar并保存在当前目录文件夹中。
  2. Make a script files for lauch it: echo @php "%~dp0phpunit.phar" %* > phpunit.cmd 为它创建一个脚本文件: echo @php "%~dp0phpunit.phar" %* > phpunit.cmd
  3. launch it, as example phpunit --version 启动它,例如phpunit --version

Hope this help 希望这个帮助

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM