Title: PHP warning / open_basedir restriction
Last modified: September 18, 2025

---

# PHP warning / open_basedir restriction

 *  Resolved [harold70k](https://wordpress.org/support/users/harold70k/)
 * (@harold70k)
 * [6 months, 3 weeks ago](https://wordpress.org/support/topic/php-warning-open_basedir-restriction-2/)
 *     ```wp-block-code
       Dear mr. Waas,First of all: thanks a lot for providing this nice plugin!I've recently installed and configured it and it displays the contents of my Google agenda well.So far so good. But when consulting the error_log (in Plesk environment) I discovered repetitive error reports for the plugin that seem to boil down to an open_basedir restriction. (I'm currently using WP version 6.8.2. and Plesk Obsidian 18.0.72 on linux Ubuntu 24.02).To be more precise, I add a recent error report:2025-09-18 12:05:22.752165 [NOTICE] [3828621] [T0] [77.249.110.190:47968:HTTP2-1#APVH_mysite.nl:443] [STDERR] PHP Warning: file_exists(): open_basedir restriction in effect. File(ActionScheduler_Lock.php) is not within the allowed path(s): (/var/www/vhosts/mysite.nl/:/tmp/) in /var/www/vhosts/mysite.nl/httpdocs/wp-content/plugins/simple-google-icalendar-widget/includes/Classloader.php on line 48\n2025-09-18 12:05:22.752397 [NOTICE] [3828621] [T0] [77.249.110.190:47968:HTTP2-1#APVH_mysite.nl:443] [STDERR] PHP Warning: file_exists(): open_basedir restriction in effect. File(ActionScheduler_OptionLock.php) is not within the allowed path(s): (/var/www/vhosts/mysite.nl/:/tmp/) in /var/www/vhosts/mysite.nl/httpdocs/wp-content/plugins/simple-google-icalendar-widget/includes/Classloader.php on line 48\n2025-09-18 12:05:22.761007 [NOTICE] [3828621] [T0] [77.249.110.190:47968:HTTP2-1#APVH_mysite.nl:443] [STDERR] PHP Warning: file_exists(): open_basedir restriction in effect. File(ActionScheduler_DateTime.php) is not within the allowed path(s): (/var/www/vhosts/mysite.nl/:/tmp/) in /var/www/vhosts/mysite.nl/httpdocs/wp-content/plugins/simple-google-icalendar-widget/includes/Classloader.php on line 48\nIn the Classloader.php file it reads:..40 {41 $file = str_replace([42 NAMESPACE,43 '\'44 ], [45 DIR,46 DIRECTORY_SEPARATOR47 ], $class) . '.php';48 if (file_exists($file)) {49 require $file;50 return true;51 }..I contacted the hosting provider who replied that the open_basedir restriction is set for security reasons and wondered whether the plugin is up to date. Is there any way to resolve this error and avoid the growing list of error reports? As said, apart from this, the plugin works well.Looking forward to your response.Many thanks in advance,Harold
       ```
   

Viewing 4 replies - 1 through 4 (of 4 total)

 *  Plugin Author [bramwaas](https://wordpress.org/support/users/bramwaas/)
 * (@bramwaas)
 * [6 months, 3 weeks ago](https://wordpress.org/support/topic/php-warning-open_basedir-restriction-2/#post-18649503)
 * Hi Harold,
 * thank you for using my plugin and reporting this issue
 * As I see in your report it seems my classloader tries to find (and load) a Class
   file of an other plugin (probably ActionScheduler or Woocommerce) outside the
   directories of my plugins namespace, maybe because it is called before all variables
   are correctly initialized. I will look further into it and hope soon to come 
   with a solution.
 * Regards Bram
 *  Plugin Author [bramwaas](https://wordpress.org/support/users/bramwaas/)
 * (@bramwaas)
 * [6 months, 3 weeks ago](https://wordpress.org/support/topic/php-warning-open_basedir-restriction-2/#post-18649795)
 * Hi,
 * are you sure that the spelling of the code in Classloader lines 40 to 51 is what
   you see.
 * It should be:
 * public static function load($class)
   40 {41 $file = str_replace([42 __**NAMESPACE**
   __,43 ‘\\’44 ], [45 __**DIR**__,46 DIRECTORY_SEPARATOR47 ], $class) . ‘.php’;
   48 if (file_exists($file)) {49 require $file;50 return true;51 }52 return false;
   53 }
 *  Plugin Author [bramwaas](https://wordpress.org/support/users/bramwaas/)
 * (@bramwaas)
 * [6 months, 3 weeks ago](https://wordpress.org/support/topic/php-warning-open_basedir-restriction-2/#post-18651019)
 * Hi Harold,
 * I just released version 2.7.1 to solve this issue.
 * I have made an additional selection on Namespace in the start of the Classloader
   load() function to prevent searching for Class-files of other plugins in unwanted(
   forbidden) directories.
 * Kind regards,
 * Bram Waasdorp.
 *  Thread Starter [harold70k](https://wordpress.org/support/users/harold70k/)
 * (@harold70k)
 * [6 months, 3 weeks ago](https://wordpress.org/support/topic/php-warning-open_basedir-restriction-2/#post-18651438)
 * Hi Bram,
 * Many, many thanks for your fast reply and for solving the issue on such a short
   notice!
   I just updated the plugin and the production of error-reports indeed 
   has stopped.As for me, five stars for your service!
 * Probably not so relevant anymore, but still in answer to you previous message;
   I rechecked the code in the classloader.php file and it is exactly as you said
   it should be. Minor deviations (missing underscores in lines 42 and 45, and a
   missing backslash in line 43) somehow must have slipped in there … my apologies
   for this!
 * Kind regards,
   Harold

Viewing 4 replies - 1 through 4 (of 4 total)

The topic ‘PHP warning / open_basedir restriction’ is closed to new replies.

 * ![](https://ps.w.org/simple-google-icalendar-widget/assets/icon-128x128.png?rev
   =2099704)
 * [Simple Google Calendar Outlook Events Widget](https://wordpress.org/plugins/simple-google-icalendar-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/simple-google-icalendar-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/simple-google-icalendar-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/simple-google-icalendar-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/simple-google-icalendar-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/simple-google-icalendar-widget/reviews/)

## Tags

 * [open_basedir](https://wordpress.org/support/topic-tag/open_basedir/)

 * 4 replies
 * 2 participants
 * Last reply from: [harold70k](https://wordpress.org/support/users/harold70k/)
 * Last activity: [6 months, 3 weeks ago](https://wordpress.org/support/topic/php-warning-open_basedir-restriction-2/#post-18651438)
 * Status: resolved