W
W
WotanWeb2020-05-17 17:23:50
PHP
WotanWeb, 2020-05-17 17:23:50

Why doesn't composer autoload work after transferring the site to hosting?

Good day!
Tell me what could be the problem. Autoload is registered in the composer:

"autoload": {
        "psr-0": {
            "models\\": "app/",
            "views\\": "app/",
            "controllers\\": "app/"
        }
    }


And, accordingly, in the future I do this:
new controllers\Routes();

On openserver it works fine, but on the host Class 'controllers\Routes' not found.
At the same time, all libraries work fine

. What could be the trouble?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
D
Daria Motorina, 2020-05-17
@WotanWeb

It seems to me that the problem is in the case sensitivity of Linux and the case insensitivity of Windows - there they rolled namespaces with a small letter, but on hosting - no

D
Dim Boy, 2020-05-17
@twix007

Maybe don't install composer on hosting? Ask the hoster for info!

A
Anton Shamanov, 2020-05-17
@SilenceOfWinter

did you move the vendor folder? if yes, then it is better to delete and form the vendor on a new one

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question