I am trying to install phploc on my ubuntu 13.04 and it doesn't seem to work here are the steps I followed.
$ sudo pear config-set auto_discover 1
$ sudo pear install phpunit/phploc
phpunit/phploc can optionally use PHP extension "bytekit"
downloading phploc-1.7.4.tgz ...
Starting to download phploc-1.7.4.tgz (10,134 bytes) .....
done: 10,134 bytes
install ok: channel://pear.phpunit.de/phploc-1.7.4 .de/phploc
Then when i type phploc it givies this error
$ phploc
PHP Warning: require_once(SebastianBergmann/FinderFacade/autoload.php): failed to open stream: No such file or directory in /usr/share/php/SebastianBergmann/PHPLOC/autoload.php on line 44 PHP Stack trace: PHP 1. {main}() /usr/bin/phploc:0 PHP 2. require() /usr/bin/phploc:48 PHP Fatal error: require_once(): Failed opening required 'SebastianBergmann/FinderFacade/autoload.php' (include_path='.:/usr/share/php.;/usr/bin/pear.:/usr/share/php/SebastianBergmann/PHPLOC/') in /usr/share/php/SebastianBergmann/PHPLOC/autoload.php on line 44 PHP Stack trace: PHP 1. {main}() /usr/bin/phploc:0 PHP 2. require() /usr/bin/phploc:48
Here is my php include path
$ php -i | grep include <br>
allow_url_include => Off => Off
include_path => .:/usr/share/php.:/usr/bin/pear.:/usr/share/php/SebastianBergmann/PHPLOC/ => .:/usr/share/php.:/usr/bin/pear.:/usr/share/php/SebastianBergmann/PHPLOC/
MYSQL_INCLUDE => -I/usr/include/mysql
xdebug.collect_includes => On => On
and included in the distribution in the file: LICENSE
Try the installation guide at: https://github.com/sebastianbergmann/phploc
I downloaded the phploc archive from https://github.com/sebastianbergmann/phploc, moved it to /usr/bin/phploc.phar.
Then i created an alias in my .bashrc as below alias phploc='/usr/bin/phploc.phar'
now i am able to access phploc like this
root@# phploc phploc 1.7.4 by Sebastian Bergmann.
Usage: phploc [switches] ...
--count-tests Count PHPUnit test case classes and test methods.
--log-xml Write result in XML format to file. --log-csv Write result in CSV format to file.
--exclude Exclude from code analysis. --names A comma-separated list of file names to check. (default: *.php)
--help Prints this usage information. --version Prints the version and exits.
--progress Print progress bar.