How cPanel user/client can install Composer
AnsweredcPanel recently remove composer. How can a user/client install Composer if they want? If Composer is not installed on the main WHM server. Is it possible? I found various command on the internet but i need specific command.
If Composer is not installed through WHM, the client can install Composer in cPanel if they want. But how?
-
suhosin.executor.include.whitelist = phar

User root:
wget https://getcomposer.org/installer -O composer-installer.php
php ./composer-installer.php --install-dir=/usr/local/bin --filename=composer
curl https://raw.githubusercontent.com/composer/getcomposer.org/master/web/installer | php -- --check
composer -V
0 -
Your clients must use the command via SSH terminal in their cPanel:
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"php composer-setup.php
php -r "unlink('composer-setup.php');"After that, you can use:
php composer.phar example.
0 -
We have an official guide on this here - https://support.cpanel.net/hc/en-us/articles/33990336418583-How-to-install-composer-on-cPanel-version-130-and-higher
1 -
cPRex
Can cPanel users/clients use this method to install Composer? User/client Install with cPanel terminal?
But problem with thismv -v composer.phar /usr/local/bin/composeruser cPanel Path not exist. Should client use "sudo"?
0 -
No, you would need to be the root user in order to install the software.
If you only have access to a cPanel account you would need to speak with your host to see if that is software they can make available for you.
0 -
Composer has been installed successfully. And it's working perfectly.
0 -
Glad to hear it!
0 -
A little feedback.
Who came up with the idea of removing Composer without any REAL prior warning? It's fine that it's on the list of deprecated items, but a tool like Composer should come with a serious warning. An email, a notification, a warning banner at the top of WHM, SOMETHING.
Today all our servers updated to v130 and we have dozens of emails related to this issue.
Fortunately, it's easy to fix, but come on, a warning would have been nice.
0 -
clopezi - oh for sure. There was actually a *lot* of internal discussion about this and we've changed our internal process a bit to ensure notifications go out before a change like this happens in the future.
1 -
Thanks! I'm happy with that :)
1
Please sign in to leave a comment.
Comments
10 comments