Is it possible to run composer on a cheap webspace that can't be accessed using ssh, only ftp?
Running system('php composer.phar install');
should work in theory - is that the recommended method?
Is it possible to run composer on a cheap webspace that can't be accessed using ssh, only ftp?
Running system('php composer.phar install');
should work in theory - is that the recommended method?
I think the best way, as suggested in the comments before, is to execute the composer step on a local system that is able to do it, and then upload the result via FTP.
Composer has some (probably optional) software dependencies that most likely will not be available on your webspace. For example it needs the Git and SVN client software in case the project you are about to install references such dependencies.
Another thing is that downloading from Github (or anywhere else) can fail. Or trigger the API limit and ask for a login.
You'd really want to collect all the software and know that it worked instead of hoping it will execute well remotely.
I have successfully installed Composer on my shared hosting using only FTP:
Install PHPShell on a shared hosting
In PHPShell's config.php
add a user and an alias:
php = "php -d suhosin.executor.include.whitelist=phar"
Log in to PHPShell and type: curl -sS https://getcomposer.org/installer | php
When successfully installed, run Composer: php composer.phar