0

I am working on a project in Laravel and I need pear to work and phpunit to work together so I can do testsfor my app properly.

I have got pear installed but it seems to not want to download and let PHPUnit work at all. Here are some commands I am running that give me errors:

Macintosh-2:~ mdunbavan$ pear install pear.phpunit.de/PHPUnit
Did not download optional dependencies: phpunit/PHP_Invoker, use --alldeps to download automatically
phpunit/PHPUnit requires PEAR Installer (version >= 1.9.4), installed version is 1.9.2
phpunit/PHPUnit can optionally use package "phpunit/PHP_Invoker" (version >= 1.1.0, version <= 1.1.99)
downloading Yaml-2.2.0.tgz ...
Starting to download Yaml-2.2.0.tgz (39,955 bytes)
...........done: 39,955 bytes
install ok: channel://pear.symfony.com/Yaml-2.2.0

So I digged around and tried to see if I could update the pear to work properly and this is what was spat out at me:

Macintosh-2:~ mdunbavan$ pear install PEAR
pear/PEAR is already installed and is the same as the released version 1.9.4
install failed

Now obviously this must mean that I have 2 versions of pear but I am really struggling to see how to sort this out, and whats worse is I need to try and get my default PHP located I think which is located in a MAMP folder. MAMP is what I use to do my local sites.

I opened the php.ini file for my mac and changed the default location of the php to be used inside the MAMP folder.

Please could someone give me a helping hand here as I have tried for days to fix this, I even went into disk utility and reset all my folder permissions as this was something which was required.

Thanks, Mark

M dunbavan
  • 1,157
  • 5
  • 22
  • 57
  • My thoughts... If you execute `which pear` you should see the one that is being invoked on the command line. Then, you can see which is probably in your path first, and remove that. If you want to use your MAMP version, you probably have to point directly to it. – Aaron Saray Mar 26 '13 at 15:50
  • 1
    Have you tried this? http://superuser.com/a/55072/91510 – Jose Armesto Mar 26 '13 at 17:44
  • I have it installed now under my local `/Users/mdunbavan/pear` directory and I have updated the export path in the bash_profile with `export PATH=/Users/mdunbavan/pear/bin:$PATH` so that I can run $ pear my-command but it cannot find the command and I have done php --ini and it gave me `Loaded Configuration File: /Applications/MAMP/bin/php/php5.3.6/conf/php.ini` – M dunbavan Mar 26 '13 at 17:53

0 Answers0