MOODLE 3.11 & Plesk:

Warning: is_readable(): open_basedir restriction in effect.

Problem

Moodle is showing the following warning. It doesn’t affect the overall performance, but we should address the warning.

Warning: is_readable(): open_basedir restriction in effect. File(/db/renamedclasses.php) is not within the allowed path(s): (/var/www/vhosts/DOMAIN/:/tmp/) in /var/www/vhosts/DOMAIN/httpdocs/lib/classes/component.php on line 1210

CAUSE

The open_basedir is a PLESK configuration, a security measure to disallow file access outside the document root directory. The PHP script tries to access the folder for which access is not allowed. The PHP open_basedir variable defines this restriction. By default, open_basedir allows access to the tmp and domain’s document root directories.

Resolution

In your Plesk hosting portal, visit “PHP Settings” > "Common settings" and change the open_basedir to “none”.
Save the config and reload your Moodle page.

Warning: is_readable(): open_basedir restriction in effect