Please help me.
It's displayed below error when I have cloned and installed Magento 2.
Magento Stack Exchange is a question and answer site for users of the Magento e-Commerce platform. It only takes a minute to sign up.
Sign up to join this communityi was trying to install Magento 2.3.5-p1
on WINDOWS 7 (32 bit)
(yes it's out of date) and i run into the same error.
as per this thread, the error seems to be related to Windows platforms and the workaround was to add !file_exists($filename)
condition to the if
statement.
vendor\magento\framework\Image\Adapter\Gd2.php
filevalidateURLScheme
function at line 96
!file_exists($filename)
condition to if
statement :
private function validateURLScheme(string $filename) : bool
{
$allowed_schemes = ['ftp', 'ftps', 'http', 'https'];
$url = parse_url($filename);
// Here !
if ($url &&
isset($url['scheme']) &&
!in_array($url['scheme'], $allowed_schemes) &&
!file_exists($filename)
) {
return false;
}
return true;
}
Anyway, this tweak worked for me till an official fix since the issue is still Open.
Just ran into this problem for my Magento 2.3.5-p2
in wamp server on Windows 10.
It looks like it is windows related problem only (I am yet to confirm that), I had to add strlen($url['scheme']) > 1
in the function of vendor\magento\framework\Image\Adapter\Gd2.php
file:
So the final function looks like this:
/**
* Checks for invalid URL schema if it exists
*
* @param string $filename
* @return bool
*/
private function validateURLScheme(string $filename) : bool
{
$allowed_schemes = ['ftp', 'ftps', 'http', 'https'];
$url = parse_url($filename);
if ($url && isset($url['scheme']) && strlen($url['scheme']) > 1 && !in_array($url['scheme'], $allowed_schemes)) {
return false;
}
return true;
}
Hope this helps someone.
I got the same error.
I changed vendor\magento\framework\Image\Adapter\Gd2.php file, Line 63 to:
if (!$filename || filesize($filename) === 0) {
After this I can install magento.
Or you can change url to 127.0.0.1, maybe it is ok.
Hope I can help you.
app/design/frontend/{theme-name}/registration.php
. Rename it to something else. (if the theme is located in the app/design folder). If it was installed by composer, then remove it from composer.json.