Running:
- MAMP 2.0.5
- PHP 5.3.6 (bundled with MAMP)
- Mac OS X Lion 10.7.2
My goal is to get a Codeception structure to work and use in my MAMP project. I follow the instructions here on how to install it.
The pear is installed and working fine. I can get a Codeception with these commands:
$ pear channel-discover codeception.com/pear $ pear install codeception/Codeception
After installation, when I try to run encoding commands, I get the following error:
Warning: require_once(Codeception/autoload.php): failed to open stream: No such file or directory in /usr/bin/codecept on line 12 Fatal error: require_once(): Failed opening required 'Codeception/autoload.php' (include_path='.:') in /usr/bin/codecept on line 12
I think the problem is caused by either:
- Conflict between installing MAMP PHP bundled with OS X
- Problem with include_path in my php.ini or somewhere else
Also interesting
- When I run the
$ phpunit from inside my project folder, I get -bash: phpunit: command not found , but if I run it like $ /Applications/MAMP/bin/php/php5.3.6/bin/phpu nit , it works fine . - I expect that in
/Applications/MAMP/bin/php/php5.3.6/bin/ will be a codecept file, but it is not there - in the /Applications/MAMP/bin/php/php5.3.6/lib/php folder /Applications/MAMP/bin/php/php5.3.6/lib/php is
Codeception I tried several different ways to install it, and I assume that one of the ways to install Codeception in Lion is copying php (unlike MAMP) - so I have a
codecept file in
/usr/bin/ as well as a
Codeception folder in
/usr/lib/php/pear/For reference:
- PHP lives here:
/Applications/MAMP/bin/php/php5.3.6/bin/php - Pearls live here:
/Applications/MAMP/bin/php/php5.3.6/bin/pear - PHPUnit lives here:
/Applications/MAMP/bin/php/php5.3.6/bin/phpunit
Any help? Suggestions?
Thanks to the help of Davert - I was able to confirm that this is a conflict with the MAMP copy of the embedded copy of PHP and Lion. To solve the problem, I created a new php.ini file in /etc , which was a duplicate of php.ini.default and changed the include_path to /Applications/MAMP/bin/php/php5.3.6/lib/php
source share