Error: Call to undefined method ComposerAutoloaderInit13c2409cfa32d1fa0c04493c0d85c93c::getLoader()

I transfer Laravel to VPS and get the following error:

Fatal error: Uncaught Error: Call to undefined method ComposerAutoloaderInit13c2409cfa32d1fa0c04493c0d85c93c::getLoader() in /var/www/site.ru/application/vendor/autoload.php on line 7
Error: Call to undefined method ComposerAutoloaderInit13c2409cfa32d1fa0c04493c0d85c93c::getLoader() in /var/www/site.ru/application/vendor/autoload.php on line 7

PHP 7.4

I do composer dump-autoload and still no changes

Please help!)

git clone ...
composer install

Don't work.

Remove vendor and

composer install

Don't work.

Upvotes: 2

Views: 2457

Answers (3)

Jibato
Jibato

Reputation: 493

You have to disable uopz extension and restart apache :

phpdismod uopz
systemctl reload apache2

Upvotes: 2

Viktor Shchepkin
Viktor Shchepkin

Reputation: 1

1 - you need to update php to a newer version (php 7.4.3 or above)

2 - use the composer from the official site (it's better to download it as a file)

In my case, everything worked the first time. I have Linux Mint 20, php 7.4.3, Laravel 7

If you have Linux Mint 20, then to install php7.4.3 you need to change mirros in Software Sources. In my case, I disable the repository from ondrej/php and changed mirros. Next install php

Upvotes: -1

tsai
tsai

Reputation: 209

For my case, symfony server:start and php -S both get the undefined method errors. I've uopz installed for testing. Disable the extension, and the error goes.

Upvotes: 2

Related Questions