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

artisticre's avatar

Uploading To Shared Server Error

I am uploading to a shared server and I get:

Parse error: syntax error, unexpected 'class' (T_CLASS), expecting identifier (T_STRING) or variable (T_VARIABLE) or '{' or '$' in /home4/xxx/index.php on line 52

This is line 52

$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);

I am not sure what the problem is

0 likes
1 reply
Cronix's avatar

Make sure the version of php on the server is at least the minimum required for the version of laravel that you installed.

In the docs, each version of laravel has the minimum requirements that the server must have, like for 5.6 it's: https://laravel.com/docs/5.6/installation

Please or to participate in this conversation.