Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can't install PHPUnit through pear [duplicate]

Tags:

php

phpunit

pear

Possible Duplicate:
Installing PHPUnit via PEAR

the install instructions for phpunit are running this:

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

the first one goes okay , 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 pear using both the latest go-pear.phar version from php.net(php 5.3.0) also tried running php go-pear.php as 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 ran pear upgrade -f PEAR to force an upgrade, it downloads the 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

like image 635
user112771 Avatar asked Sep 19 '09 05:09

user112771


2 Answers

Try type in console:

pear upgrade pear
like image 104
Ondra Avatar answered Sep 19 '22 12:09

Ondra


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

  1. I removed my pear folder which resided in:

    C:\Program Files\Zend\ZendServer\bin

  2. Set php include_path to:

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

  3. Got go-pear.php from:

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

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

  4. Run php go-pear.php set PHP Code dir to same as include_path

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

and everything works

I am running 1.9.0.

like image 26
user112771 Avatar answered Sep 18 '22 12:09

user112771