Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

giwrgos's avatar

Deploying Laravel 5.1 on vidahost

I'm trying to install a laravel project on the vidahost clouding hosting packages.

I'm using the Hosting Control Panel of vidahost to create a linux cloud account. Then I'm changing the PHP version to 5.6 and activating the SSH access. Via ssh access I'm checking the php version using this command "php -v" and it shows me version 5.4 instead of 5.6. I have contacted the vidahost to change for me the php version to 5.6 . Then I have installed the composer to the server so I can use the "composer create-project laravel/laravel" command. After downloading the laravel on the server I tried to install it using composer but I got the following error message "Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /var/sites/p/***.com/laravel/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 100
Script php artisan clear-compiled handling the post-update-cmd event returned with an error"

I have attached also an image for better trouble shooting . Does anyone had similar issue?

I have used also this tutorial, without any luck http://www.webunknown.co.uk/work/posts/using-laravel-4-with-the-vidahost-cloud

http://s28.postimg.org/a2j9i2o1p/Screen_Shot_2015_12_08_at_15_28_03.png

0 likes
4 replies
jlrdw's avatar

Have you searched for the keyword deploy on this forum there are a lot of answers one of which could help you.
Edit: can't you just upload everything via FTP and don't mess with composer on the live server? That's how I upload to godaddy, and I've had no problems there. Also read. https://laracasts.com/discuss/channels/laravel/env-file

bobbybouwmann's avatar

@jlrdw The problem is not uploading, but the PHP version.

@giwrgos You get that error because Laravel 5.1 uses the Model::class notation instead of the string notation. This means your php version is still not updated..

nutmix's avatar

How did you solve this? I am using vidahost, but have had no luck in running composer. Even if I do this:

$ /usr/bin/php-5.6-cli composer

i still get the dreaded "unexpected 'class' (T_CLASS)"

I also tried putting "alias php=/usr/bin/php-5.6-cli" in the .bashrc and running it via ". .bashrc" but get same error, even though "php -v" gives 5.6.

Somewhere in the bowels of composer, it is using the old version. No luck yet.

Please or to participate in this conversation.