After successful installation Magento 2 getting blank page for admin login

After facing the same issue looking into the error area.
I have found a solution which is works for me.

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

The function isPathInDirectories added a line

 $realPath = str_replace('\\', '/', $realPath); 

Function details line number 133

protected function isPathInDirectories($path, $directories)
{
    if (!is_array($directories)) {
        $directories = (array)$directories;
    }
    $realPath = $this->fileDriver->getRealPath($path);
    $realPath = str_replace('\\', '/', $realPath); // add this line here
    foreach ($directories as $directory) {
        if (0 === strpos($realPath, $directory)) {
            return true;
        }
    }
    return false;
}

It’s working fine now.

You May Also Like

About the Author: Jafor Iqbal

Leave a Reply