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

EliasNiyonsaba's avatar

Installing a Laravel application: Ask your hosting provider to use PHP 7.2.5 or higher for both HTTP and CLI.

I am installing a Laravel application but it is showing me this message: Parse error: syntax error, unexpected T_CLASS, expecting T_STRING or T_VARIABLE or '$' in /home/www/ethicalresearchsolution.com/accounting/artisan on line 18

I am using php 7.4.12 version on my hosting provider.

You can help me by looking at ethicalresearchsolution.com/accounting

it also shows this error Error: Ask your hosting provider to use PHP 7.2.5 or higher for both HTTP and CLI.

Please kindly help me

Thank in advance

0 likes
1 reply
mcangueiro's avatar

This seems to be an issue with your directory structure.

That first error on the artisan file and line 18 seems to be an error registering the autoloader.

require __DIR__.'/vendor/autoload.php';

Make sure your paths are all correct and that they have the required permissions.

Please or to participate in this conversation.