-
Bug
-
Resolution: Fixed
-
Minor
-
4.1.14
Notification M4.1
Warning: file_exists(): open_basedir restriction in effect. File(/db/access.php) is not within the allowed path(s):
Input received from hosting provider
- The error does not occur consistently because it happens during the caching process. Once the data has been written to the cache, the error no longer appears.
- It does always occur when the function is called after all caches have been purged and debugging is set to maximum, but it does not consistently happen in every environment.
- It specifically originates from the function function get_deprecated_capability_info($capabilityname) in the /lib/accesslib.php.
This function makes a call for each capability to:
core_component::get_component_directory($cap['component'])
If this returns null, you will receive this error message."
The most recent core adjustment MDL-79697 but this does not seem to touch the specific code for the issue above.
Their conclusion was:
Add a check after defpath is set to ensure that it is different from /db/access.php, OR retrieve the component with the current call, and if it is null, skip this capability OR resolve the underlying issue.
I found various other trackers and forum discussions around this subject, most recent:
https://tracker.moodle.org/browse/MDL-72292
(https://moodle.org/mod/forum/discuss.php?d=460897#p1852512)