0

I install magento on window with Xampp and when I access backend it show black window can any body help me thanks in advance.

https://i.stack.imgur.com/ZGFs2.png

0

1 Answer 1

1

This is a path issue. try editing the Validator file from vendor folder with namespace

Magento\Framework\View\Element\Template\File

At around line 138 replace code with this one

$realPath = str_replace('\\', '/',$this->fileDriver->getRealPath($path));

save then cache:flush

Then check if it works. Hope it helps

solution reference with same issue

9
  • protected function isPathInDirectories($path, $directories) { if (!is_array($directories)) { $directories = (array)$directories; } foreach ($directories as $directory) { if (0 === strpos($this->fileDriver->getRealPath($path), $directory)) { return true; } } return false; }
    – Monu kumar
    Dec 28, 2018 at 4:12
  • this is function code where you add this line
    – Monu kumar
    Dec 28, 2018 at 4:12
  • protected function isPathInDirectories($path, $directories) { if (!is_array($directories)) { $directories = (array)$directories; } foreach ($directories as $directory) { if (0 === strpos(str_replace('\\', '/',$this->fileDriver->getRealPath($path)), $directory)) { return true; } } return false; } check this one
    – fmsthird
    Dec 28, 2018 at 4:17
  • not working after adding this code
    – Monu kumar
    Dec 28, 2018 at 4:49
  • protected function isPathInDirectories($path, $directories) { if (!is_array($directories)) { $directories = (array)$directories; } $realPath = str_replace('\\', '/',$this->fileDriver->getRealPath($path)); foreach ($directories as $directory) { if (0 === strpos($realPath, $directory)) { return true; } } return false; } Try this one
    – fmsthird
    Dec 28, 2018 at 5:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.