After successful installation when i run the admin url it's giving me this. I'm not sure what's happening. So if anyone have any solution for this it will be great help.
Asked
Active
Viewed 4.4k times
16
-
check logs may be something thair – Adarsh Shukla Dec 03 '18 at 09:02
-
i don't know actually what to check in logs. This is the first time i'm installing magento. Can you be more specific? – Nayem323 Dec 03 '18 at 09:04
-
which os r u using – Adarsh Shukla Dec 03 '18 at 09:05
-
@AdarshShukla windows 10 – Nayem323 Dec 03 '18 at 09:06
-
find errors.log file in your server – Adarsh Shukla Dec 03 '18 at 09:07
-
Sorry there's no such file in the var/log directory – Nayem323 Dec 03 '18 at 09:09
-
what are u using wamp or xamp – Adarsh Shukla Dec 03 '18 at 09:11
-
@AdarshShukla xampp – Nayem323 Dec 03 '18 at 09:12
-
\xampp\apache\logs\error.log, where xampp is your installation folder – Adarsh Shukla Dec 03 '18 at 09:13
-
also check consol logs – Adarsh Shukla Dec 03 '18 at 09:13
-
[ssl:warn] [pid 10848:tid 500] AH01909: www.example.com:443:0 server certificate does NOT include an ID which matches the server name [mpm_winnt:notice] [pid 10848:tid 500] AH00354: Child: Starting 150 worker threads. – Nayem323 Dec 03 '18 at 09:16
2 Answers
64
Update
This is Magento bug. Wrong paths to Windows are generated. The fixed fix is
Magento 2.3.0 - 2.3.3
#/vendor/magento/framework/View/Element/Template/File/Validator.php:140
the string
if (0 === strpos($realPath, $directory)) {
return true;
}
to replace
$realDirectory = $this->fileDriver->getRealPath($directory);
if ($realDirectory && 0 === strpos($realPath, $realDirectory)) {
return true;
}
Magento 2.2.7
/vendor/magento/framework/View/Element/Template/File/Validator.php:113
code
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;
}
to replace
protected function isPathInDirectories($path, $directories)
{
$realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));
if (!is_array($directories)) {
$directories = (array)$directories;
}
foreach ($directories as $directory) {
if (0 === strpos($realPath, $directory)) {
return true;
}
}
return false;
}
If You can't find out the (/vendor/magento/framework/) folder in magento 2.2.7 - 2.3.3 . Then You can check it here:
#lib\internal\Magento\Framework\View\Element\Template\File\Validator.php
Ameer Hamza
- 5
- 3
Andrey Rad
- 901
- 8
- 7
-
$realPath = $this->fileDriver->getRealPath($path);there is no such line – Nayem323 Dec 06 '18 at 07:42 -
-
1oh my god why, just spent 3 hours on this, magento is shipping code with bugs on a vanilla installation – Yehia A.Salam Dec 30 '18 at 15:58
-
1
-
1
-
-
If you have used composer install for your project then find this file here
\lib\internal\Magento\Framework\View\Element\Template\File– Hemant Aug 16 '19 at 16:10 -
-
-
@AndreyRad Thanks a lot ..Soln worked with 2.3.4 ..Can you please tell how do you debugged issue is in Validator.php file ? – Mahendra Jella Feb 27 '20 at 10:26
-
-
3
If you can't find the (/vendor/magento/framework/) folder in magento 2. Then you can find it here:
C:\xampp\htdocs\magento\lib\internal\Magento\Framework\View\Element\Template\File\Validator.php
Lucas de Rijke
- 31
- 6
Kulwinder Singh
- 31
- 2
