0

Hello I have a problem with my admin page, I have the connection chart but just after I have a blank page and nothing helps I can't find a solution I tried everything as per example this:

In vendor\magento\framework\View\Element\Template\File\Validator.php inside this function, I modified the following line...

$realPath = $this->fileDriver->getRealPath($path);

with this line:

$realPath = str_replace('\\', '/', $this->fileDriver->getRealPath($path));

Update :

Here is a screenshot enter image description here

and here a screenshot of the php modules: enter image description here enter image description here

it would be nice if you help me thank you in advance

3 Answers 3

0

After changing the above line have you re-deployed, try the following command:

php bin/magento setup:static-content:deploy -f
1
  • Hi,I have already done nothing
    – Primalon
    Mar 29, 2023 at 14:34
0
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;

} check this code if it is working for you

1
  • Hello, idem is not working :(
    – Primalon
    Mar 30, 2023 at 8:35
0

Please once again verify these PHP extension enable or not In php.ini enable php extension

sodium, ext-bcmath, ext-ctype, ext-curl, ext-dom, ext-gd, ext-hash, ext-iconv, ext-intl, ext-mbstring, ext-openssl, ext-pdo_mysql, ext-simplexml, ext-soap, ext-xsl, ext-zip ext-sockets if not then enable it. After enable plz run all the command and then check it is working or not

Second one plz try in these 3 files:

vendor\magento\framework\Image\Adapter\Gd2.php

private function validateURLScheme(string $filename) : bool
{
  $allowed_schemes = ['ftp', 'ftps', 'http', 'https'];
  $url = parse_url($filename);
  if ($url && isset($url['scheme']) && !in_array($url['scheme'], $allowed_schemes) && !file_exists($filename)) {
      return false;
  }

  return true;
}

vendor/magento/framework/view/element/template/file/validator.php with this.

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;
}

Magento/Framework/Interception/PluginListGenerator.php

$cacheId = implode('-', $this->scopePriorityScheme) . "-" . $this->cacheId;

Plz update these three files and check, Hope it will work for you.

6
  • @primalon it is working or not Apr 4, 2023 at 9:48
  • I can't find the file PluginListGenerator.php in this path Magento/Framework/Interception/
    – Primalon
    Apr 4, 2023 at 10:31
  • I tried with the two files which are modified still nothing
    – Primalon
    Apr 4, 2023 at 10:44
  • check this path line number 156 vendor\magento\framework\Interception\PluginListGenerator.php Apr 4, 2023 at 11:08
  • the file PluginListGenerator.php does not exist in vendor\magento\framework\Interception\
    – Primalon
    Apr 4, 2023 at 12:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.