Magento – Magento 2 Autoload error

magento2.2.2varien-autoload

I am using Magento 2.2.2 version.

I have configured the setup in my local and it is working fine.

When I moved to the server, it is not working.

I am getting the following error.

I have followed the below steps:

  1. Gave 777 to the entire folder.

I have got the below error:

Autoload error
Vendor autoload is not found. Please run 'composer install' under application root directory.

Update:

I am trying to install composer using the command composer install.

I am getting the below output:

Loading composer repositories with package information
Installing dependencies (including require-dev) from lock file
  - Installing magento/zendframework1 (1.13.1)
Downloading: 100%
Invalid zip file, retrying...

It is downloading the files and says Invalid zip file, retrying... so many times.

Best Answer

I had experienced same issue few days ago. What i just did was i went to app/etc/env.php and changed the hostname from localhost to 127.0.0.1, and it worked for me. I hope it will work for you as well.