I had a similar situation with my hosting company. Despite the fact that I had access to SSH, PHP installed in the SSH environment was 5.2.17 and I could not install the composer. The web server itself had PHP 5.4, and I managed to find a workaround, and it installed Composer and Laravel 4, running the PHP file on the web server.
For Laravel 4 to work, you need at least PHP 5.3 along with some required extensions, i.e. MCRYPT. You can check your version of PHP and other related information using the phpinfo() function.
The PHP file I used to install Laravel is below. Copy composer.phar to your Laravel installation path.
<?php putenv('COMPOSER_HOME=' . '/path/to/laravel'); $command = '/usr/local/php54/bin/php-cli /path/to/laravel/composer.phar install -d /path/to/laravel'; $output = system($command . ' 2>&1'); echo('<pre>' . $command . "\n" . $output); ?>
I had to use the full path for the php command line, because by default php pointing to the old version, 5.2.17. Thus, you may not need the full path. If you do, adjust the path accordingly.
I hope this helps.
source share