From: http://icdif.com/computing/2011/01/29/install-phpdocumentor-ubuntu-linux/
On a machine with a localhost webserver in /var/www:
sudo apt-get install php-pear
sudo pear config-set data_dir /var/www
sudo pear channel-discover pear.phpdoc.org
sudo pear install phpdoc/phpDocumentor
sudo mkdir /var/www/phpdoc-output
cd /var/www/
sudo chown www-data:www-data phpdoc-output
Then visit http://localhost/PhpDocumentor in a browser. If you see the PHPDocumentor web GUI, success. Move on to the next section.
From: http://www.charlestonsw.com/making-github-wiki-docs-from-php-source/
In a new directory, anywhere:
git clone git@github.com:evert/phpdoc-md.git
cd phpdoc-md/src
git clone git@github.com:fabpot/Twig.git
cd ../bin
Open phpdocmd in your favorite text editor, and replace the following:
<?php
// Potential composer autoloader paths
$paths = array(
__DIR__ . '/../vendor/autoload.php',
__DIR__ . '/../../../autoload.php',
);
foreach($paths as $path) {
if (file_exists($path)) {
include $path;
break;
}
}
// Everts crappy option parser.
With this:
<?php
$docmdDir = dirname("PUT THE PHPDocMD DIR HERE"); // seriously, put it here
set_include_path(get_include_path().PATH_SEPARATOR.$docmdDir.'/../src/Twig/lib');
// Potential composer autoloader paths
foreach($paths as $path) {
if (file_exists($path)) {
include $path;
print "including $path\n";
break;
}
}
Twig_Autoloader::register();
// Everts crappy option parser.
Save it.
Get a copy of your project:
git clone git@github.com:INN/Largo.git
mkdir docs
phpdoc -d ./Largo -t ./docs
If you get a permissions error, chmod 766
the templates directory named in the error message. That should fix this error.
In the older version on phpdoc, it used to generate a structure.xml
file, but that is no longer the default behavior.
Try running phpdocs with the following option: --template="clean"
.
Getting "phpdoc: command not found" -> As i had done same thing, I am using ubuntu 14.04