Reputation: 543
I'm trying to upload my laravel project in host. But when i hit the url, it gives an blank page. When i checked in the error log, it is showing following errors:
[23-Jan-2018 23:01:35] PHP Warning: Unexpected character in input: '\' (ASCII=92) state=1 in /home4/knownepa/public_html/tra/index.php on line 51
[23-Jan-2018 23:01:35] PHP Parse error: syntax error, unexpected T_STRING in /home4/knownepa/public_html/tra/index.php on line 51
I have following lines of code in those lines:
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
$response = $kernel->handle(
$request = Illuminate\Http\Request::capture()
);
$response->send();
$kernel->terminate($request, $response);
Can anyone help me?
Upvotes: 0
Views: 372
Reputation: 11646
The issue is with your PHP version.
Your PHP
version should be above 5.2, as PHP 5.2 and below don't support namespaces.
In fact, Laravel 5.5 requires PHP 7.0 and above.
Laravel requirements
But as your Laravel Version is 5.2, from the Laravel 5.2 docs
Your PHP version should be atleast 5.5.9 or above.
So I suggest you to update to the latest version of PHP to avoid these type of issues.
Upvotes: 2