cancel
Showing results for 
Search instead for 
Did you mean: 

Autoload Error on localhost

Autoload Error on localhost

Hi,

 

I met all the prerequisites, installed composer, and installed Magento 2 successfully using command line on Ubuntu (/var/www/html/magento2).

 

[Progress: 362 / 362]
[SUCCESS]: Magento installation complete.
[SUCCESS]: Magento Admin URI: /admin_1h7i05

 

However while trying to access store URI, I am getting below error on the web page.

 

URL: http://localhost/magento2

 

createApplication('Magento\Framework\App\Http'); * $bootstrap->run($app); * -------------------------------------------- * * Copyright © 2015 Magento. All rights reserved. * See COPYING.txt for license details. */ try { require __DIR__ . '/app/bootstrap.php'; } catch (\Exception $e) { echo <<
Autoload error

{$e->getMessage()}
HTML; exit(1); } $bootstrap = \Magento\Framework\App\Bootstrap::create(BP, $_SERVER); /** @var \Magento\Framework\App\Http $app */ $app = $bootstrap->createApplication('Magento\Framework\App\Http'); $bootstrap->run($app);

 

I am getting similar error even while I am trying to install the software using Setup wizard option. PFB the error :

 

URL :  http://localhost/magento2/setup/


Autoload error

{$e->getMessage()}
HTML; exit(1); } // For Setup Wizard we are using our customized error handler $handler = new \Magento\Framework\App\ErrorHandler(); set_error_handler([$handler, 'handler']); \Zend\Mvc\Application::init(require __DIR__ . '/config/application.config.php')->run();

 

It will be really helpful if someone can guide me to find the issue here and resolve it.

 

Thanks in advance.

8 REPLIES 8

Re: Autoload Error on localhost

Looks like you have to check your server (is it apache?) settings, since php is not enabled. Best way to check this is create a temporary info.php file with phpinfo() as contents and see if that loads.

Re: Autoload Error on localhost

Hi maddyC,

 

Thanks for the reply.

 

I ran below command. And now the display for "http://localhost/magento2" or "http://localhost/magento2/setup" is coming as blank page instead of earlier error I mentioned in my last post.

>apt-get install libapache2-mod-php5

 

And while checked the phpinfo(), its appearing successfully as below. 

URL : http://localhost/test.php

 

PHP Version 5.6.16-1+deb.sury.org~trusty+1
System Linux prasenjeet-VirtualBox 3.19.0-37-generic #42~14.04.1-Ubuntu SMP Mon Nov 23 15:13:51 UTC 2015 x86_64
Server API Apache 2.0 Handler
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php5/apache2
Loaded Configuration File /etc/php5/apache2/php.ini
Scan this dir for additional .ini files /etc/php5/apache2/conf.d
Additional .ini files parsed /etc/php5/apache2/conf.d/05-opca

 

I am using apache2. PFB.

 

/var/www/html/magento2# apache2 -v
Server version: Apache/2.4.16 (Ubuntu)
Server built: 2015-09-08T00:00:00

 

Please suggest while the magento pages are coming as blank instead of storefront please.

 

Thanks,

Prasenjeet

 

Re: Autoload Error on localhost

I solved this issue by enabling mod_rewrite. Now Magento storefront is working fine.

 

However I am getting 404 while trying to access admin page. (http://localhost/magento2/admin).

I have checked so many solution regarding this in this forums and verified all configurations but still the admin page is not coming.

 

It's landing in "Whopps.. Our Bad.. " page of magento.

 

Any suggestion please?

 

Thanks. 

Re: Autoload Error on localhost

Please check what is your admin name in the `app/etc/env.php` under backend_frontname

Re: Autoload Error on localhost

This issue got resolved after a fresh re installation. Thanks all for your replies.

Re: Autoload Error on localhost

Hi,

I got the same issue that you had, and cant figure it out,

How did you solve it in the end?

 

Thanks Devora

Attached is my screen when trying to run localhostSelection_034.png

Re: Autoload Error on localhost

I had the same problem and I realized I was missing this module. Installing it fixed the error

sudo apt install libapache2-mod-php7.0

 

Re: Autoload Error on localhost

I've been burning my ass off installing Magento 2 for days. Thank you very much for this!