I am getting this error Valid class not found from basename 'Magento\Framework\Validator\EmailAddress'
on the checkout page on Magento 2.
i am using plesk
-
Also add what you tried from your end. Add more details like server configurations and magento version, it will help viewers to understand your question better and answer it– Rajeev SinghMar 23 at 6:40
3 Answers
If you are using Plesk then go to your PHP settings from Plesk admin
And add dot to include_path option
Adding . will fix the error for you.
In order to solve the ‘Validate Class not Found from Baseame’ in Magento 2, you need to open the Loader.php file from vendor/magento/zendframework1/library/Zend/ and update the code as f0llowing:
public static function isReadable($filename)
{
if (is_readable($filename)) {
// Return early if the filename is readable without needing the
// include_path
return true;
}
if (strtoupper(substr(PHP_OS, 0, 3)) == 'WIN'
&& preg_match('/^[a-z]:/i', $filename)
) {
// If on windows, and path provided is clearly an absolute path,
// return false immediately
return false;
}
foreach (self::explodeIncludePath() as $path) {
if ($path == '.') {
if (self::is_readable2($filename)) {
return true;
}
continue;
}
$file = $path . '/' . $filename;
if (self::is_readable2($file)) {
return true;
}
}
return false;
}
private static function is_readable2($filename) {
try {
return is_readable($filename);
} catch (Exception $ex) {
return false;
}
}
Include the zend library in your PHP configuration for include_path
include_path
.:/var/www/vhosts/<domain_name>/httpdocs/vendor/magento/zendframework1/library/: