Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Installing manually PHPDocumentor on Mac

After trying to install PHPDocumentor with PEAR install with no success, i tried it manually as is detailed on the official website: http://www.phpdoc.org/docs/latest/for-users/installation.html

I downloaded the files and i make an alias on /usr/bin/ but when i try to execute phpdoc.php via terminal y it shows an error.

This is what i try:

> cd /usr/bin/
> ./phpdoc.php

And this is the error:

PHP Warning:  include_once(/Applications/MAMP/htdocs/phpdocumentor/src/phpDocumentor/../../vendor/autoload.php): failed to open stream: No such file or directory in /Applications/MAMP/htdocs/phpdocumentor/src/phpDocumentor/Bootstrap.php on line 72
PHP Warning:  include_once(): Failed opening '/Applications/MAMP/htdocs/phpdocumentor/src/phpDocumentor/../../vendor/autoload.php' for inclusion (include_path='/Applications/MAMP/bin/php/php5.3.6/lib/php/:/Applications/MAMP/bin/php/php5.3.6/lib/bin/') in /Applications/MAMP/htdocs/phpdocumentor/src/phpDocumentor/Bootstrap.php on line 72
PHP Fatal error:  Class 'phpDocumentor_Task_Runner' not found in /Applications/MAMP/htdocs/phpdocumentor/bin/phpdoc.php on line 37

I am using Mac Os X and as you can see, i use MAMP to run Apache. What's going on here? Why it tries to open a file which doesn't exist? (because it really doesn't exist inside PHPDocumentor folder)

Thanks.

like image 700
Alvaro Avatar asked Apr 26 '12 18:04

Alvaro


2 Answers

Did you try :

curl -s http://getcomposer.org/installer | php

php composer install

on phpdocumentor2 directory (you should find composer.json)

Composer is a dependency manager for php. So it will populate phpdocumentor projet with external/vendor dependencies

like image 77
Kakawait Avatar answered Nov 09 '22 23:11

Kakawait


Try this to install Composer into your MAMP php bin:

cd yourapp/ && curl -s http://getcomposer.org/installer | /Applications/MAMP/bin/php/php5.3.6/bin/php
like image 3
Philip Avatar answered Nov 09 '22 22:11

Philip