rubycoloredglasses


I'm Jason, a web application developer in East Tennessee.


Installing PHPdoc for Ubuntu for use with Command Line

I wanted to install PhpDocumentor for use on my server so that I could generate documentation from the command line. I found this article, which instructed me to somehow change the PEAR setting for data_dir. I installed PhpDocumentor in my web root and it just didn’t work and gave me a bunch of errors in the browser.

I uninstalled the package via PEAR (ala ‘pear uninstall phpdocumentor’ command), then deleted the folder. I just wanted to install it in the proper path so that it’s available from the command line using ‘phpdoc’.

I downloaded the source of PhpDocumentor directly from SourceForge, and it had phpdoc available in the folder, but I’m not sure which folder to put it in so that it’s in my path for the command line.

Finally I just reset the ‘data_dir’ setting back to the default by using this command:

sudo pear config-set data_dir /usr/share/php/data

Next I installed the package again via PEAR, just like I should have originally done.

sudo pear upgrade PhpDocumentor

This worked like a charm.

$ which phpdoc
/usr/bin/phpdoc
comments powered by Disqus