简体   繁体   中英

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

When am installing the phpunit below error being displayed

'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:

'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 ).

Follow the instruction for install on windows here .

A simply way is:

  1. Download the phpunit.phar here and save in the current directory folder.
  2. Make a script files for lauch it: echo @php "%~dp0phpunit.phar" %* > phpunit.cmd
  3. launch it, as example phpunit --version

Hope this help

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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