Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

laravel Server error 500 in cpanel hosting

I'm hosting laravel 5.1 in my cpanel but it always accured error.I tried every method (htaccess, chmod 644 and storage give o r+W) but it doesn't work in my cpanel but when i removed following line from index.php of public folder it give access to index.php file:

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

$response = $kernel->handle(
    $request = Illuminate\Http\Request::capture()
);

$response->send();

$kernel->terminate($request, $response);

so it give access to mine folder . Can anybody help me? can it cause due to php version of cpanel?

like image 392
Binod Bhandary Avatar asked Jan 07 '23 14:01

Binod Bhandary


1 Answers

Paste this code at the top of your index.php file which will be in the public folder:

ini_set('display_errors', '1');
ini_set('display_startup_errors', '1');
error_reporting(E_ALL);

Then visit the URL of your project and there you will see the issue because which laravel is throwing this error.

like image 122
Sajid Javed Avatar answered Jan 17 '23 16:01

Sajid Javed