Gammer
Gammer

Reputation: 5608

Laravel deployment HTTP ERROR 500

I have my project in /var/www/html/project on the server,

When ever i hit example.com shows default server page, Then i tried example.com/project i got list of my project files/folders, Then i tried example.com/project/public it gave me HTTP ERROR 500 error.

Here is my public/index.php file :

<?php
  require __DIR__.'/../bootstrap/autoload.php';
  $app = require_once __DIR__.'/../bootstrap/app.php'; 
  $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
  $response = $kernel->handle(
      $request = Illuminate\Http\Request::capture()
  );
  $response->send();
  $kernel->terminate($request, $response);

My project/storage permissions are drwxr-xrwx. 5 root root 4096 Apr 20 12:56 storage

What am i missing ?

Upvotes: 1

Views: 3038

Answers (3)

ahmed Kandil
ahmed Kandil

Reputation: 1

check php version Laravel 5.5 requires PHP >= 7.0.0

Laravel 5.6 requires PHP >= 7.1.3

Upvotes: 0

Kaloyan Drenski
Kaloyan Drenski

Reputation: 1066

Had the same exact issue and in my case the problem was the default php version (which was 5.5+) of the shared hosting service that I use. After I changed the php version to 7+ (laravel 5.5 needs php version >= 7) everything started to work. Hope that helps someone!

Upvotes: 1

Vinicius Luiz
Vinicius Luiz

Reputation: 132

Your permissions at /storage and /bootstrap/cache have to be 775 and try to change owner group to www-data if you're using apache

Upvotes: 1

Related Questions