Max OS X 10.7.. when i run phing -v i get the following errors:
Warning: require_once(phing/Project.php): failed to open stream: No such file or directory in /usr/lib/php/pear/phing/Phing.php on line 22
Fatal error: require_once(): Failed opening required 'phing/Project.php' (include_path='.:') in /usr/lib/php/pear/phing/Phing.php on line 22
Here are the commands i used:
pear config-set auto_discover 1
pear install phing/phing
Here is my php.ini:
include_path = ".:/Applications/MAMP/bin/php/php5.3.6/lib/php"
running whereis for php, pear, and phing returns:
bash-3.2$ whereis php
/usr/bin/php
bash-3.2$ whereis pear
/usr/bin/pear
bash-3.2$ whereis phing
/usr/bin/phing
running config-get for pear returns:
→ pear config-get php_dir
/usr/lib/php/pear
checking this folder, system.php and phing.php both exist in this path.
Seems like
include_pathis somehow broken.Check PEAR’s directory:
Whatever directory is returned, it should contain PEAR files (
System.phpandphingfiles in particular)Check that correct
php.iniis used:Run
php --iniand see what INI file is being loaded. Then make sure this INI files contains PEAR directory in it’sinclude_pathCheck
include_path:Run
php -c /path/to/php.ini -r 'echo get_include_path() . "\n";'.Update
The problem is indeed with
include_pathsince the error message reports(include_path='.:')which clearly shows that PEAR is NOT in your include path. This means that wrongphp.iniis being loaded for CLI PHP. To fix it, find correctphp.inifile (step 2) and addto it.