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
Commands are giving error 'bin' is not recognized as an internal or external command,
operable program or batch file.
How you run commands in windows system? Try with same approach
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
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.
If your Magento 2 back-end (admin panel) shows a blank page after installation on your local system, there are several possible reasons and solutions:
A blank page often means there’s an error that is being hidden. Enable developer mode to display error messages:
php bin/magento deploy:mode:set developer
Then check for error messages.
Run the following commands to regenerate necessary files:
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento setup:static-content:deploy -f
php bin/magento cache:flush
Then, try accessing the admin panel again.
If permissions are not set correctly, the back-end may not load. Set appropriate permissions using:
chmod -R 777 var/ generated/ pub/static/ pub/media/