cancel
Showing results for 
Search instead for 
Did you mean: 

After installation of magento 2 on local system. My front-end works but my back-end is shows a blank

Re: After installation of magento 2 on local system. My front-end works but my back-end is shows a b

Below commands should work for the window, please try

C:\xampp\php\php.exe bin/magento setup:upgrade
C:\xampp\php\php.exe bin/magento setup:di:compile
C:\xampp\php\php.exe bin/magento setup:static-content:deploy -f
C:\xampp\php\php.exe bin/magento cache:flush

Manish Mittal
https://www.manishmittal.com/

Re: After installation of magento 2 on local system. My front-end works but my back-end is shows a b

Commands are giving error 'bin' is not recognized as an internal or external command,
operable program or batch file.

Re: After installation of magento 2 on local system. My front-end works but my back-end is shows a b

How you run commands in windows system? Try with same approach

Manish Mittal
https://www.manishmittal.com/

Re: After installation of magento 2 on local system. My front-end works but my back-end is shows a b

Hi,

Find : /vendor/magento/framework/View/Element/Template/File/Validator.php:139find : 
foreach ($directories as $directory) {
    if (0 === strpos($realPath, $directory)) {
        return true;
    }
}

Replace with:
foreach ($directories as $directory) {    $realDirectory = $this->fileDriver->getRealPath($directory);
    // and replace `$directory` with `$realDirectory`
    if (0 === strpos($realPath, $realDirectory)) {
        return true;
    }
}

It may solve the issue!

https://magento.stackexchange.com/questions/252069/after-installing-magento-2-3-admin-login-page-cant-open-properly/252070


Prema M

Re: After installation of magento 2 on local system. My front-end works but my back-end is shows a b

Got below error after making changes on validator.php:

There has been an error processing your request

 

Notice: Undefined variable: realPath in E:\xampp\htdocs\magento2\vendor\magento\framework\View\Element\Template\File\Validator.php on line 145

 

Error log record number: 26603495

 

In exception log got this error:

[2018-12-28 05:29:39] main.CRITICAL: SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.
{"exception":"[object] (Zend_Db_Adapter_Exception(code: 2002): SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.
at E:\\xampp\\htdocs\\magento2\\vendor\\magento\\zendframework1\\library\\Zend\\Db\\Adapter\\Pdo\\Abstract.php:144, PDOException(code: 2002): SQLSTATE[HY000] [2002] No connection could be made because the target machine actively refused it.