1

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

Error screenshot: enter image description here

1
  • 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 Commented Mar 23, 2023 at 6:40

3 Answers 3

1

If you are using Plesk then go to your PHP settings from Plesk admin

enter image description here

And add dot to include_path option

enter image description here

Adding . will fix the error for you.

0

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

Include the zend library in your PHP configuration for include_path

include_path

.:/var/www/vhosts/<domain_name>/httpdocs/vendor/magento/zendframework1/library/:

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.