Jump to content

installing PHP Unit on Mac OS X 10.4 - need detailed installation instructions


Recommended Posts

I've followed some instructions I've found online, got everything installed, at least I believe so.

When typing "phpunit" into terminal I'm getting following error message:

-bash: /usr/local/bin/phpunit: /Applications/MAMP/bin/php5/lib/php: bad interpreter: Permission denied

 

please help!

I'm stuck with PHPUnit installation second day already!

what I've done so far:

 

1. downloaded PHPUnit-3.3.9.tgz and unzipped it

2. got PHPUnit directory out of it and placed into /Applications/MAMP/bin/php5/lib/php

3. edited the PHPUnit/Util/Fileloader.php file - replaced @php_bin@ with /Applications/MAMP/bin/php5/bin/php

4. copied pear-phpuint from the PHPUnit-3.3.9 directory

into /usr/local/bin/ renaming it to be phpunit, and replaced the @php_bin@ in it with /Applications/MAMP/bin/php5/bin/php

5. changed my /private/etc/php.ini to have the line:

include_path = ".:/php/includes:/Applications/MAMP/bin/php5/lib/php/PHPUnit"

 

WHAT AM I MISSING?

  • 2 years later...

I've followed some instructions I've found online, got everything installed, at least I believe so.

When typing "phpunit" into terminal I'm getting following error message:

-bash: /usr/local/bin/phpunit: /Applications/MAMP/bin/php5/lib/php: bad interpreter: Permission denied

 

please help!

I'm stuck with PHPUnit installation second day already!

 

You have incorrectly set your PEAR path configuration settings using the config-set command.

 

"phpunit" is a script that requires a PHP hash-bang in the first line to tell the shell what executable to run this script with. Since your hash-bang path is incorrect and not the php CLI executable, you get the "bad interpreter" error.

 

You need to have set "php_bin" to /Applications/MAMP/bin/php5/bin/php. You have /Applications/MAMP/bin/php5/lib/php. When installing phpunit via PEAR, phpunit borrows configuration settings from PEAR to configure itself. To fix this problem, open phpunit using your text editor and change the TWO instances of /Applications/MAMP/bin/php5/lib/php to /Applications/MAMP/bin/php5/bin/php

 

This will fix your problem

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.