cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to access Magento admin page

SOLVED
   Did you know you can see the translated content as per your choice?

Translation is in progress. Please check again after few minutes.

Unable to access Magento admin page

just installed Magento 2.2 on linux centos 6 with php 7.1.17 on Apache 2.4 but when I digit the url: http://localhost/Magento/admin I receive 404.

Can somebody help me ?

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Unable to access Magento admin page

ok resolved after

php magento cache:clean
php magento cache:flush

the link now responds at : http://localhost/admin_1nfkvs

View solution in original post

18 REPLIES 18

Re: Unable to access Magento admin page

Just check frontName value from app/etc/env.php file and add that value as suffix to your store front url instead of admin at above url.

Now run command
php bin/magento cache:flush
If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial

Re: Unable to access Magento admin page

the URI in env.php is correct.

And when I issue the command php bin/magento cache:flush I receive this error :

 [Symfony\Component\Console\Exception\CommandNotFoundException]  
  There are no commands defined in the "cache" namespace.   

Re: Unable to access Magento admin page

Remove generated folder content except .htaccess file and remove var/cache

Run command
php bin/magento setup:di: compile

If you havent install composer
Run command from root of magento installation

composet install
If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial

Re: Unable to access Magento admin page

php bin/magento setup:di: compile

 

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 2097160 bytes) in /var/www/html/Magento/setup/src/Magento/Setup/Module/Di/Code/Reader/FileClassScanner.php on line 81 :-(

Re: Unable to access Magento admin page

Hello @fabio_marano

 

just remove generated/code and generated/metadata, var/view_processed

 

and check in incognito mode.

 

 


Problem solved? Click Kudos & Accept as Solution!
Sunil Patel
Magento 2 Certified Professional Developer & Frontend Developer

Re: Unable to access Magento admin page

[fabio@fabio-linux Magento]$ php -dmemory_limit=5G bin/magento setup:di:compile
Compilation was started.
Proxies code generation... 0/7 [>---------------------------]   0% < 1 sec 60.0 Proxies code generation... 1/7 [====>-----------------------]  14% < 1 sec 64.0 Repositories code generation... 1/7 [====>-----------------------]  14% < 1 sec Repositories code generation... 2/7 [========>-------------------]  28% 17 secs Service data attributes generation... 2/7 [========>-------------------]  28% 17Service data attributes generation... 3/7 [============>---------------]  42% 17Application code generator... 3/7 [============>---------------]  42% 17 secs 19Application code generator... 4/7 [================>-----------]  57% 27 secs 21Interceptors generation... 4/7 [================>-----------]  57% 27 secs 214.0Interceptors generation... 5/7 [====================>-------]  71% 37 secs 234.0Area configuration aggregation... 5/7 [====================>-------]  71% 37 secArea configuration aggregation... 6/7 [========================>---]  85% 45 secInterception cache generation... 6/7 [========================>---]  85% 45 secsInterception cache generation... 7/7 [============================] 100% 49 secsInterception cache generation... 7/7 [============================] 100% 49 secs 310.0 MiB
Generated code and dependency injection configuration successfully.

 

Now when connect to localhost/Magento I see only text and images no static files ( css, etc )

every links is broken with 404 both in incognito mode and normal mode. Admin page not works.

please help!

Re: Unable to access Magento admin page

Run below command
php bin/magento setup:upgrade
php bin/magento setup:static-content: deploy
If Issue Solved, Click Kudos/Accept As solutions. Get Magento insight from
Magento 2 Blogs/Tutorial

Re: Unable to access Magento admin page

when I run the command -> php magento setup-upgrade

the following error arises :

#0 /var/www/html/Magento/vendor/magento/framework/Config/Dom.php(115): Magento\Framework\Config\Dom->_initDom('<?xml version="...')
#1 /var/www/html/Magento/vendor/magento/framework/ObjectManager/Config/Reader/Dom.php(70): Magento\Framework\Config\Dom->__construct('<?xml version="...', Object(Magento\Framework\App\Arguments\ValidationState), Array, 'xsi:type', NULL)
#2 /var/www/html/Magento/vendor/magento/framework/Config/Reader/Filesystem.php(149): Magento\Framework\ObjectManager\Config\Reader\Dom->_createConfigMerger('Magento\\Framewo...', '<?xml version="...')
#3 /var/www/html/Magento/vendor/magento/framework/Config/Reader/Filesystem.php(130): Magento\Framework\Config\Reader\Filesystem->_readFiles(Object(Magento\Framework\Config\FileIterator))
#4 /var/www/html/Magento/vendor/magento/framework/App/ObjectManagerFactory.php(275): Magento\Framework\Config\Reader\Filesystem->read('prim in /var/www/html/Magento/vendor/magento/framework/Config/Dom.php on line 384

Re: Unable to access Magento admin page

I've to change the configuration of apache 2.4 because every URI points to example.com/  when the correct one is example.com/Magento/

Can somebody give some hints?