Hello Team.
I have done setup and install the magento2.3 successfully, but store and admin URL not displaying/opening. please see the screenshot and let me know where is issue. I download the latest 2.4 with sample data from magento site.
1. Install successfully.
2. Store Address or URL. http://localhost/Magento2/
3. Magento Admin Address http://localhost/Magento2/admin
4. Database created - http://localhost/phpmyadmin/db_structure.php?server=1&db=magento
Please let me know what is the issue here
Thanks
Jitendra Vishwakarma
9967241174
Hello @jitendra_vishwa
After installing magento 2.3 latest, have you run the proper commands ? if Not.
Kindly open your terminal (SSH) and run the below commands in the sequence from the root directory of magento2.
php bin/magento setup:upgrade php bin/magento setup:di:compile php bin/magento setup:static-content:deploy -f php bin/magento cache:clean php bin/magento cache:flush
Then check , it will works !
Hello @jitendra_vishwa
It's the core issue of Magento 2.3.0. To fix this issue you have to change the code in the core file of Magento.
Go to path /vendor/magento/framework/View/Element/Template/File/Validator.php In this file find
$realPath = $this->fileDriver->getRealPath($path);
Replace with
$realPath = str_replace('\', '/', $this->fileDriver->getRealPath($path));
I have run below command in window os by using cmd.exe but same issue not is displaying in store URL and also stop , start the apache , mysql. all command executed except
php bin/magento setup:di:compile
Please see error like that.
C:\xampp\htdocs\Magento2>php bin/magento setup:di:compile
Compilation was started.
%message% 0/7 [>---------------------------] 0% < 1 sec 52.0 MiB%message% 0/7 [>---------------------------] 0% < 1 sec 52.0 MiBProxies code generation... 0/7 [>
---------------------------] 0% < 1 sec 52.0 MiB
Proxies code generation... 1/7 [====>-----------------------] 14% 3 secs 56.0 MiB
Repositories code generation... 1/7 [====>-----------------------] 14% 3 secs 56.0 MiBPHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to a
llocate 65536 bytes) in C:\xampp\htdocs\Magento2\vendor\klarna\module-kp\Api\Data\UrlsInterface.php on line 18
Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 65536 bytes) in C:\xampp\htdocs\Magento2\vendor\klarna\module-kp\Api\Data\UrlsInterf
ace.php on line 18
Thanks
Jitendra V
9967241174
Hello @jitendra_vishwa
Run below command:
php -dmemory_limit=-1 bin/magento setup:di:compile
php -dmemory_limit=5G bin/magento setup:di:compile
Hello @Manish Mittal
Please check this line of code you have provided correct..
$realPath = str_replace('\', '/', $this->fileDriver->getRealPath($path));
i replace it but below other line of code disable it.
also run both command .store page are coming totally while. not opening. same issue
Thanks
Jitendra V
Hello @jitendra_vishwa
Try this:
$realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));
and run shared command.
Hello Team,
I did above changes but still have same issue.
command line
Hello team,
can you provide the solution. it pending long time. If magento2.3 is unstable version. not able to setup locally . please let me know.
Thanks
JItendra V
9967241174
Hello @jitendra_vishwa
Find: /vendor/magento/framework/View/Element/Template/File/Validator.php:139
find:
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;
}
}.