0

Install magento 2 on my premises and I have these errors and I can't see the system

enter image description here

Already use the following commands

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
php bin/magento setup:di:compile
php bin/magento cache:flush
php bin/magento cache:clean

But this does not solve my problem, the maximum I can see on the screen is this

enter image description here

How can I solve these errors?

Edwin Aquino
  • 133
  • 1
  • 1
  • 6
  • Hello @Edwin Aquino Please refer this https://magento.stackexchange.com/questions/252188/magento-2-2-7-admin-panel-blank-page hope help you – Mohit Patel Feb 15 '20 at 04:33

1 Answers1

3

To resolve this issue on the localhost.

vendor/magento/framework/View/Element/Template/File/Validator.php

Find the below code

if (0 === strpos($realPath, $directory)) {
    return true;
}

And replace it with

$realDirectory = $this->fileDriver->getRealPath($directory);
if ($realDirectory && 0 === strpos($realPath, $realDirectory)) {
   return true;
}

Then flush the cache and your issue will be resolved.

Kishor Thummar
  • 3,000
  • 1
  • 9
  • 18