Jump to content

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.