Category Archives: KeyHelp

Installing composer on KeyHelp control panel

I’ve been trying to figure this out for the last 2 hours. But I have finally managed to install it.

From offical composer page copy paste first two lines

https://getcomposer.org/download/

like:

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
php -r "if (hash_file('sha384', 'composer-setup.php') === 'c31c1e292ad7be5f49291169c0ac8f683499edddcfd4e42232982d0fd193004208a58ff6f353fde0012d35fdd72bc394') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;"

Then, since KeyHelp makes users folders as root you will need to use i.e. files folder for installing Composer with command above. Then use this command:

COMPOSER_HOME=/home/users/someuser/files/ php composer-setup.php

What this command does?! COMPOSER_HOME is var and enables you to write composer.phar inside different home path.

All this without root. That was the point in the first place. Root and composer are not good option.

Problem was with the permissions in the first place. Users are from root. And Composer wanted to use $cd to access home folder. It poined to /home/users/someuser (someuser is current logged in user).

Error: Unable to create Composer home directory “/home/users/someuser/.config/composer”: mkdir(): Permission denied