Cannot install PHPUnit through a pear

Possible duplicate:
Install PHPUnit via PEAR

The installation instructions for phpunit do the following:

pear channel-discover pear.phpunit.de pear install phpunit/PHPUnit 

the first goes well, on the second I get an error:

 phpunit/PHPUnit requires PEAR Installer (version >= 1.8.1), installed version is 1.7.2 phpunit/PHPUnit can optionally use package "pear/Image_GraphViz" (version >= 1.2.1) phpunit/PHPUnit can optionally use package "pear/Log" phpunit/PHPUnit can optionally use PHP extension "xdebug" (version >= 2.0.5) No valid packages found install failed 

I just installed the pear using the latest version of go-pear.phar from php.net (php 5.3.0) also tried to run php go-pear.php , as the pear website says.

running pear -V gives me version 1.7.2, when I run pear upgrade PEAR , it says my version is newer than the current noe, which is 1.9.0, if I run pear upgrade -f PEAR to force update, it downloads files and installs successfully, but I still have version 1.7.2 and cannot install phpunit.

I am running windows vista, php 5.3.0

+7
php phpunit pear
source share
3 answers

Try entering a console:

 pear upgrade pear 
+12
source share

I found my solution ('cweiske' on irc.efnet.nl #pear) -

  • I deleted the folder with the pear, which was located in:

    C:\Program Files\Zend\ZendServer\bin

  • Set php include_path to:

    C:\Program Files\Zend\ZendServer\bin\pear

  • Get go-pear.php from:

    http://pear.php.net/go-pear

    Save the file as go-pear.php , I saved it in C:\Program Files\Zend\ZendServer\bin

  • Run php go-pear.php set the PHP Code dir the same as include_path

    C:\Program Files\Zend\ZendServer\bin\pear

and everything works

I am running 1.9.0.

+7
source share

If you have problems with the upgrade or installation process, you can use:

 peardev upgrade PEAR peardev channel-discover pear.phpunit.de peardev install phpunit/PHPUnit 

It worked for me; I have Windows 7 64x + WAMP.

+2
source share

All Articles