Reputation: 453
I'm having trobule installing phpDocumentor via PEAR on a CentOS machine and I don't even know if this is pear or php related.
Here are the commands that I executed and their output:
# pear -v install phpdoc/phpDocumentor
## http://pastebin.com/2ijRG9KW
# /usr/local/bin/phpdoc
-bash: /usr/local/bin/phpdoc: No such file or directory
# tree -a -h /usr/local/lib/php/phpDocumentor/
## http://pastebin.com/NjynYKPL
I've included the tree command because I'm thinking something is not OK there...
At first glance, is this a PEAR or phpDocumentor issue?
Tried
# whereis phpdoc
phpdoc: /usr/local/bin/phpdoc
But
# cd /usr/local/bin
# ls -l | grep -i phpdoc
lrwxrwxrwx. 1 root root 48 Nov 23 21:46 phpdoc -> /usr/local/lib/php/phpDocumentor2/bin/phpdoc.php
-rwxr-xr-x. 1 root root 1039 Nov 24 21:31 .tmpphpdoc*
Guess what...
-bash: cd: /usr/local/lib/php/phpDocumentor2: No such file or directory
But there is a phpDocumentor folder (instead of phpDocumentor2) whose tree is available on this pastebin
Upvotes: 2
Views: 1796
Reputation: 30565
I encountered the same issue and found there was no phpdoc
link in my folder /usr/local/bin
To remedy the problem, I used pear config-show
to allow me to view where the PEAR Bin directory is and then created a symbolic link that the phpdoc
file in that location.
My PEAR Bin directory is set to: /usr/local/Cellar/php55/5.5.8/bin/
My Local Bin directory is set to: /usr/local/bin
To create the link:
ln -s /usr/local/Cellar/php55/5.5.8/bin/phpdoc /usr/local/bin/phpdoc
Upvotes: 3
Reputation: 6688
You can use pear config-show
to see what directory it uses as its bin_dir
, which is where the PEAR installer puts its "binaries". I had thought that the main Linux distributions had preconfigured their PEAR setups to use /usr/bin
as the right location, so you might try /usr/bin/phpdoc
. Granted, /usr/bin
is almost always in your default PATH, so just trying phpdoc
along should usually be sufficient.
That memory limit error from the PEAR installer means that the PEAR installer itself crashed while attempting to install phpDocumentor. You'll need to edit your php.ini file to increase the value of the memory_limit parameter. It looks like right now it's defaulted to a tiny 8MB. I'd suggest at least 256MB unless this is a small/old computer. You should then try a reinstall (pear install --force phpdoc/phpdocumentor
). I expect the --force
will be necessary since PEAR might think it had installed it successfully already. If install
gives trouble, then try update --force
instead.
Upvotes: 2
Reputation: 453
In the same folder where I've executed pear install I found an error_log file:
[23-Nov-2013 22:27:54 UTC] PHP Fatal error: Allowed memory size of 33554432 bytes exhausted (tried to allocate 8192 bytes) in /usr/local/lib/php/PEAR/Installer.php on line 580
Gotcha.
Upvotes: 0