Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

fredemagi's avatar

Server error: Class not found after deployment

Hello,

I just pushed my site to a live server. In a controller, I use a class with "use...", and it works fine on localhost. However, after the deployment the browser complains about error 500. I've opened the log file in storage, and it says that the class was not found with Class "App\HTTPClient\Client" not found". Full error:

production.ERROR: Class "App\HTTPClient\Client" not found {"exception":"[object] (Error(code: 0): Class \"App\HTTPClient\Client\" not found at /home/forge/MYSITE.dk/app/Http/Controllers/HomeController.php:721)
[stacktrace]

I made the class myself and added it using composer autoload. It looks like:

"autoload": {
        "psr-4": {
            "App\": "app/",
            "XMLHandler\": "app/",
            "HTTPClient\": "app/"
        },
        "classmap": [
            "database/seeds",
            "database/factories"
        ]
    },

Any help is appreciated.

0 likes
2 replies
jlrdw's avatar

Check letter case, Linux is case sensitive.

1 like

Please or to participate in this conversation.