ERROR 500 - Internal Server Error! PHP 7.4

При попытке открыть сайт выдает ошыбку 500.

Вот мой .htaccess:

<IfModule mod_rewrite.c>

<IfModule mod_negotiation.c>
    Options -MultiViews
</IfModule>

RewriteEngine On
RewriteBase /

# Redirect Trailing Slashes...
RewriteRule ^(.*)/$ /$1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>

Мой .env файл:

APP_ENV=local
APP_DEBUG=true
APP_KEY=bL4HXXXXXXXXKT0Q3UYYYYYYpBZZZZ

DB_HOST=localhost
DB_DATABASE=DB_NAME
DB_USERNAME=user
DB_PASSWORD=password

CACHE_DRIVER=file
SESSION_DRIVER=file
QUEUE_DRIVER=sync

MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null

RE_CAP_SITE=6xxxxxxxxxxxxBVUuFo4ouQyyyylwqQzzzzzzzVX
RE_CAP_SECRET=6xxxxxxxxxxxxJhun8yyyyyyyyGLuEVgzzzzzzLx

Мой index.php:

<?php
/**
 * Laravel - A PHP Framework For Web Artisans
 *
 * @package  Laravel
 * @author   Taylor Otwell <[email protected]>
 */

/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader for
| our application. We just need to utilize it! We'll simply require it
| into the script here so that we don't have to worry about manual
| loading any of our classes later on. It feels nice to relax.
|
*/

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

/*
|--------------------------------------------------------------------------
| Turn On The Lights
|--------------------------------------------------------------------------
|
| We need to illuminate PHP development, so let us turn on the lights.
| This bootstraps the framework and gets it ready for use, then it
| will load up this application so that we can run it and send
| the responses back to the browser and delight our users.
|
*/

$app = require_once __DIR__.'/bootstrap/app.php';

/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request
| through the kernel, and send the associated response back to
| the client's browser allowing them to enjoy the creative
| and wonderful application we have prepared for them.
|
*/

$env = file_get_contents('.env');

$envlines = preg_split('/\s+/', $env);

$db_host = '';
$db_database = '';
$db_username = '';
$db_password = '';

foreach ($envlines as $line) {
    if (strpos($line, 'DB_HOST') === 0) {
        $vars = explode('=', $line);
        $db_host = $vars[1];
        continue;
    }
    if (strpos($line, 'DB_DATABASE') === 0) {
        $vars = explode('=', $line);
        $db_database = $vars[1];
        continue;
    }
    if (strpos($line, 'DB_USERNAME') === 0) {
        $vars = explode('=', $line);
        $db_username = $vars[1];
        continue;
    }
    if (strpos($line, 'DB_PASSWORD') === 0) {
        $vars = explode('=', $line);
        $db_password = isset($vars[1]) ? $vars[1] : '';
        continue;
    }
}

$conn = @mysqli_connect($db_host, $db_username, $db_password);

if (!$conn) {
    header('Location: setup-config.php');
    exit;
}

if (!$conn->select_db($db_database)) {
    header('Location: setup-config.php');
    exit;
}

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

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

$response->send();

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

laravel.log: https://pastebin.com/sd8ZiXMx

Содержания файла index.blade.php: https://pastebin.com/Cv8hsndU

Содержания файла helpers.php: https://pastebin.com/1TSY2rTC


Ответы (0 шт):