1

I am trying to install PHPUnit_Selenium using the command

pear install phpunit/PHPUnit_Selenium

The version of pear that i am running is 1.9.4. The above command returned

Attempting to discover channel "phpunit"... Attempting fallback to https instead of http on channel "phpunit"... unknown channel "phpunit" in "phpunit/PHPUnit_Selenium" invalid package name/package file "phpunit/PHPUnit_Selenium" install failed

Searching google I found this (a few times) as a suggestion. So I tried

pear channel-discover pear.phpunit.de

and

sudo pear channel-discover pear.phpunit.de (incase it made a difference)

previous command returned

Discovering channel pear.phpunit.de over http:// failed with message: channel-add: Cannot open "http://pear.phpunit.de/channel.xml" (File http://pear.phpunit.de:80/channel.xml not valid (received: HTTP/1.1 403 Forbidden ( Forefront TMG denied the specified Uniform Resource Locator (URL). ) )) 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: Operation timed out))

What do I need to do to install PHPUnit_Selenium?

1
  • You might also need to ensure you have the proper access (Administrator on Windows, sudo with *nix). Ensure the web is connected. Also, use the --all-deps to include additional dependencies in case you are missing something. Commented Dec 19, 2013 at 17:21

4 Answers 4

5

The PEAR channel for phpunit has been discontinued as of the end of April 2014, to install PHPUnit and PHPUnit_Selenium install via composer.

Configure your composer.json to the specific package version (See PHPUnit_Selenium)

In your composer.json file, write: { "require": { "phpunit/phpunit": "*", "phpunit/phpunit-selenium": ">=1.3.3" } } Try the following command: $ composer install

Sign up to request clarification or add additional context in comments.

Comments

3

Use "pear.phpunit.de" instead of "phpunit"

sudo pear install pear.phpunit.de/PHPUnit_Selenium

Phpunit require curl to be installed,if you didn't install it try this:

sudo apt-get install curl libcurl3 libcurl3-dev php5-curl
sudo service apache2 restart

1 Comment

When I try that command I get Attempting to discover channel "pear.phpunit.de"... Attempting fallback to https instead of http on channel "pear.phpunit.de"... unknown channel "pear.phpunit.de" in "pear.phpunit.de/PHPUnit_Selenium" invalid package name/package file "pear.phpunit.de/PHPUnit_Selenium" install failed. I defiantly have curl installed. I found an alternative route and installed it using Composer
2

Maybe you need to specify a proxy for pear to route it's traffic through. Try something like:

$ sudo pear config-set http_proxy http://foo.bar/
$ sudo pear channel-discover pear.phpunit.de
$ sudo pear install phpunit/PHP_Selenium

Comments

0

Installing phpunit-selenium package in Ubuntu Trusty is as easy as running:

apt-get install phpunit-selenium

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.