ethar's avatar
Level 5

500 error after upload Laravel Project to cpanel

in localhost project run without any error, but when upload project i got thes error

PHP Warning:  require(/home4/panorax1/public_html/lcode/vendor/autoload.php): failed to open stream: No such file or directory in /home4/panorax1/public_html/index.php on line 23

I modified index.php

require __DIR__.'/lcode/vendor/autoload.php';
$app = require_once __DIR__.'/lcode/bootstrap/app.php';

lcode is a folder I put my code on it (in the root directory)

public_html I put public folder content

when run composer dump-autoload

i got these error

Warning: Uncaught ErrorException: require(/home4/panorax1/lcode/vendor/composer/../../App/Helpers/GetLang.php): failed to open stream: No such file or directory in /home4/panorax1/lcode/vendor/composer/autoload_real.php:66

GetLang is a function inside App\Helpers,

0 likes
4 replies
jlrdw's avatar

Make sure the case is correct, Linux is case sensitive.

1 like
ethar's avatar
Level 5

@jlrdw the proble , cause not found GetLang.php, case is correct autoload


    "autoload": {
        "psr-4": {
            "App\": "app/"
        },
        "classmap": [
            "database/seeds",
            "database/factories"
        ],"files": [
            "App/Helpers/GetLang.php"
        ]
    },

ther error

require(/home4/panorax1/lcode/vendor/composer/../../App/Helpers/GetLang.php): failed to open stream: No such file or directory in /home4/panorax1/lcode/vendor/composer/autoload_real.php on line 66

Please or to participate in this conversation.