500 Error on new Laravel installation copied from git repo

  http-status-code-500, laravel, php

Posting a question and then answering it myself because I couldn’t find the answer out there.

I restored a Laravel project from a git repo, ran all of the normal composer and artisan commands to setup the project, and I was getting a 500 Server Error with no explanation of why the page would not load. Eventually I found the error in the Apache logs:

AH01215: PHP Fatal error:  Cannot declare interface PsrLogLoggerInterface, because the name is already in u
se in /.../laravelproject/bootstrap/cache/compiled.php on line 14048

Laravel wasn’t even loading, so laravel’s own storage/logs/laravel.log file didn’t contain any help.

Since I was on a shared hosting account, the apache log file wasn’t in an obvious location…always figure out where that’s being stored so you can check there when Laravel isn’t giving hints.

From composer.json, Here are the laravel and package versions that are being used. The server is running PHP 7.4.

 "require": {
        "php": ">=5.6.4",
        "barryvdh/laravel-debugbar": "^2.4",
        "guzzlehttp/guzzle": "*",
        "laravel/framework": "5.3.*",
        "laravelcollective/html": "^5.3.0",
        "maatwebsite/excel": "~2.1.0"
    },

Source: Laravel

Leave a Reply