I have these things:
How can I install Composer? (My aim is to install Restler)
Edit: I do not have SSH access.
yes, but it's not necessary to download vendors with composer install . you can move composer binary file to Server and move your vendor too, then place vendor folder on your project and use composer dump-autoload .
download composer. phar https://getcomposer.org/download/ - this is PHP Archive which can be extracted via Phar() and executed as regular library.
This tutorial worked for me, resolving my issues with /usr/local/bin permission issues and php-cli (which composer requires, and may aliased differently on shared hosting).
First run these commands to download and install composer:
cd ~ mkdir bin mkdir bin/composer curl -sS https://getcomposer.org/installer | php mv composer.phar bin/composer
Determine the location of your php-cli (needed later on):
which php-cli
(If the above fails, use which php
)
It should return the path, such as /usr/bin/php-cli, /usr/php/54/usr/bin/php-cli, etc.
edit ~/.bashrc and make sure this line is at the top, adding it if it is not:
[ -z "$PS1" ] && return
and then add this alias to the bottom (using the php-cli path that you determined earlier):
alias composer="/usr/bin/php-cli ~/bin/composer/composer.phar"
Finish with these commands:
source ~/.bashrc composer --version
It depends on the host, but you probably simply can't (you can't on my shared host on Rackspace Cloud Sites - I asked them).
What you can do is set up an environment on your dev machine that roughly matches your shared host, and do all of your management through the command line locally. Then when everything is set (you've pulled in all the dependencies, updated, managed with git, etc.) you can "push" that to your shared host over (s)FTP.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With