mardi 14 décembre 2021

I can't start laravel application after update php to 7.4.26 [duplicate]

I was using Laravel 5.4 with PHP 5.6 and the application was working fine, but then I updated the PHP version to 7.4.26 and now the application only shows me a PHP file:

<?php

use Illuminate\Contracts\Http\Kernel;
use Illuminate\Http\Request;

define('LARAVEL_START', microtime(true));

/*
|--------------------------------------------------------------------------
| Check If The Application Is Under Maintenance
|--------------------------------------------------------------------------
|
| If the application is in maintenance / demo mode via the "down" command
| we will load this file so that any pre-rendered content can be shown
| instead of starting the framework, which could cause an exception.
|
*/

if (file_exists(__DIR__.'/../storage/framework/maintenance.php')) {
    require __DIR__.'/../storage/framework/maintenance.php';
}

/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader for
| this application. We just need to utilize it! We'll simply require it
| into the script here so we don't need to manually load our classes.
|
*/

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

/*
|--------------------------------------------------------------------------
| Run The Application
|--------------------------------------------------------------------------
|
| Once we have the application, we can handle the incoming request using
| the application's HTTP kernel. Then, we will send the response back
| to this client's browser, allowing them to enjoy our application.
|
*/

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

$kernel = $app->make(Kernel::class);

$response = $kernel->handle(
$request = Request::capture()
)->send();

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

I have tried some settings from the .htaccess and composer.json file but have not been successful. I have also updated with composer update but it has not worked.

In addition, I created a clean Laravel application to know if at least the page that Laravel brings by default would appear, but a PHP file always appears (In other attempts to configure it, it has shown me the content of the server.php file).



from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3IQUlqA
via IFTTT

Aucun commentaire:

Enregistrer un commentaire