cancel
Showing results for 
Search instead for 
Did you mean: 

Installation at 51% Magento 2 localhost

Re: Installation at 51% Magento 2 localhost

@kanhaiya5590  thanks! this worked

Re: Instalation at 51% Magento 2 localhost

Worked for me!

Thank you!

Re: Installation at 51% Magento 2 localhost

Please look into this link

https://github.com/magento/magento2/issues/28055#issuecomment-622533641

 

a guy named omerfademir wrote this thing

"I found a workaround for Windows OS. Image Adapter try opens to image files ('open function in Gd2.php line 63). validateURLScheme function return false always because it checking 'URL' format but local files not valid for this format, so it returns false.

Find validateURLScheme function in vendor\magento\framework\Image\Adapter\Gd2.php file. at line 96. Replace function with this:

 

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

I have tested personally on my windows machine

its working fine..

 

one more issue while installing i faced is black screen on admin panel 

if you get black screen on running admin panel  then you just need to change the code in validator.php

in vendor/magento/framework/view/Element/Template/File/Validator.php

at line138 comment this code

//$realPath = $this->fileDriver->getRealPath($path);
and add this code inplace of it
$realPath = str_replace('\\','/',$this->fileDriver->getRealPath($path)); 
 
this issue is because of slashes, in linux it will be '/' whereas in windows it will be '\'

Re: Installation at 51% Magento 2 localhost

Thank you its works for me Also

Re: Installation at 51% Magento 2 localhost

Re: Instalation at 51% Magento 2 localhost

Hello 
Capture.PNG

Re: Instalation at 51% Magento 2 localhost

Please Check the screen shot which i post
My magento installation cannot be complete and not have any error

Re: Instalation at 51% Magento 2 localhost

Hello, I have found solution, you need find Gd2.php the path will be described in error log

and do next

if (!$filename || filesize($filename) === 0) {//|| !$this->validateURLScheme($filename)
I think it is only if running on localhost
 

 

Re: Installation at 51% Magento 2 localhost

Find validateURLScheme function in vendor\magento\framework\Image\Adapter\Gd2.php file. at line 96. Replace following function with below code. For more details please go to Magento 2 Installation at 51% Error: (Wrong file in Gd2.php:64) Module ‘Magento_Theme’

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

	return true;
}

 

Re: Installation at 51% Magento 2 localhost

I found a workaround for Windows OS. Image Adapter try opens to image files ('open function in Gd2.php line 63). validateURLScheme function return false always because it checking 'URL' format but local files not valid for this format, so it returns false.

Find validateURLScheme function in vendor\magento\framework\Image\Adapter\Gd2.php file. at line 96. Replace function with this:

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

Retry installation. it will work.