Danijel
Danijel

Reputation: 867

Laravel crash on init with error 500 (no additional info)

I have some problems with deploying app to a shared host.

What i did till now:

After some debugging it crashes here:

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

I get Error 500 and no other information. I double checked right etc. they are 777. It's just crash with error 500.

EDIT1:

I checked .php version and on localhost it works with 5.6.25 i tested with 5.6.35 and it's ok too.

I investigate it further. It seems to crash at Application.php ::207 line

$this->make($bootstrapper)->bootstrap($this);
$bootstrapper has value -> "Illuminate\Foundation\Bootstrap\RegisterProviders"

If anybody knows more.

Upvotes: 2

Views: 4718

Answers (1)

Danijel
Danijel

Reputation: 867

I found out that paths in my App were incorrect.

It was developed on windows so path folders were \ but than after migrating to production server (Linux) could not open anything. So changing my custom includes (require_one calls) with \ -> / finally app worked

I came to this error after checking

public function render($request, Exception $exception) in my App/Exception/Handler.php

and putting var_dump($exception) finally printed what was going on. If it will help to anybody else.

Thanks to answer: https://stackoverflow.com/a/32714318/1861519 which pointed me to a Exception handler.

EDIT1:

One more hint, for a shared hosting if you don't have SSH (to run artisan/composer), check laravel/bootstrap/cache/config.php Paths were incorrect there.

EDIT2:

Big thanks got to: https://stackoverflow.com/a/33652169/1861519 For right configuration of custum public folder.

Upvotes: 4

Related Questions