0

This question already has an answer here:

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

marked as duplicate by Piyush, Sukumar Gorai, Manashvi Birla, Dhiren Vasoya, Priyank Dec 28 '18 at 9:43

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

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

  • 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 '18 at 4:12
  • this is function code where you add this line – Monu kumar Dec 28 '18 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 – magefms Dec 28 '18 at 4:17
  • not working after adding this code – Monu kumar Dec 28 '18 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 – magefms Dec 28 '18 at 5:07

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