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

goodnesskay's avatar

Laravel on Shared Hosting

having issues with my laravel upload on shared hosting. the error log shows this:

[24-Sep-2016 06:58:53 Africa/Lagos] PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home/esquarem/public_html/public/index.php on line 50 [24-Sep-2016 07:06:10 Africa/Lagos] PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home/esquarem/public_html/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 146 [24-Sep-2016 07:06:14 Africa/Lagos] PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home/esquarem/public_html/vendor/laravel/framework/src/Illuminate/Foundation/helpers.php on line 146 [24-Sep-2016 07:06:25 Africa/Lagos] PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home/esquarem/public_html/public/index.php on line 50 [24-Sep-2016 07:11:46 Africa/Lagos] PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home/esquarem/public_html/public/index.php on line 54 [24-Sep-2016 07:12:19 Africa/Lagos] PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home/esquarem/public_html/public/index.php on line 54 [24-Sep-2016 07:23:47 Africa/Lagos] PHP Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home/esquarem/public_html/public/index.php on line 51

0 likes
7 replies
Snapey's avatar

check the php version meets the minimum requirements

jlrdw's avatar

And this has been answered so so many times before.

goodnesskay's avatar

@snapey i don't think it is my php version because I use php 7.0 or do you mean the php version of my web hosting provider?

goodnesskay's avatar
goodnesskay
OP
Best Answer
Level 1

Ok guys. Thanks for your answers. I was able to upload it after changing the php version in my cpanel. I am planning on making a tutorial on how to upload a laravel site soon. thanks a lot

Snapey's avatar

of course I meant on the server !

Please or to participate in this conversation.