• I have been getting these errors on sites hosted on my server for a while now:

    [09-Sep-2021 18:48:05 UTC] PHP Warning: file_exists(): open_basedir restriction in effect. File(/wp-cache-blog17f7cbb9913f660d72e8e34c84e76cd5.php) is not within the allowed path(s): (/home/***/domains/***/:/home/***/domains/_codebase:/home/***/php_errors/:/tmp) in /home/***/domains/***/public_html/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 100

    What could be causing these errors?

Viewing 15 replies - 1 through 15 (of 40 total)
  • Thread Starter vespino

    (@vespino)

    No idea?

    Plugin Author Donncha O Caoimh (a11n)

    (@donncha)

    I think you should reset the plugin configuration. There may be something broken there. You’ll find a form at the end of the Advanced settings page to do this.

    Thread Starter vespino

    (@vespino)

    I will give this a try on one of my websites.

    Thread Starter vespino

    (@vespino)

    Same result, after a few hours I’m getting the error again.

    Hello,

    I am getting the same error as vespino and tried the suggested fix but it does not work. Please can you suggest something else we could try? @vespino, were you able to resolve this and, if so, how?

    Thanks,

    Grant

    Thread Starter vespino

    (@vespino)

    @grant-mcn no solution yet.

    @donncha Please can you help us?

    Thanks

    When this happens again, I need you to debug it. Edit wp-admin/index.php and under the line require_once __DIR__ . '/admin.php'; add this temporarily:

    wp_mail( "your email", "DEBUG: cache path", "cache path: " . $cache_path );

    Change “your email” to your own email address. And then load your dashboard. You should be sent an email with the cache path in it. Make sure to undo and save wp-admin/index.php again as you will get an email every time someone loads the dashboard.

    Do you see “cache path: /x/y/z/cache/” where /x/y/z/ is the path to where you have the cache directory?
    Or do you only see “cache path:” ?

    What you’re seeing leads me to believe your configuration somehow got corrupted and the path to the cache directory has been overwritten.

    If you try the development version of the plugin which you can find on the following page, you’ll be shown an error as a HTML comment at the end of any page if the plugin detects a broken configuration.

    https://odd.blog/y/2o

    The error is “WARNING! Caching disabled. Configuration corrupted. Reset configuration on Advanced Settings page.”

    If you get that warning, take a look at wp-content/wp-cache-config.php

    Here’s a sample config file that should look similar to what your config file looks like for comparison.
    https://github.com/Automattic/wp-super-cache/blob/master/wp-cache-config-sample.php

    Thread Starter vespino

    (@vespino)

    @donncha Nothing out of the ordinary I guess > cache path: /path/to/domain/wp-content/cache/

    @vespino Did you see that WARNING text already? Is that what $cache_path was when the WARNING text was shown in the HTML of your website? Or is it what it normally is? That looks normal to me.

    Thread Starter vespino

    (@vespino)

    @donncha sorry, I don’t understand your question.

    OK, disregard the above.

    Next time you see the warning in your logs check wp-content/wp-cache-config.php and see if $cache_path is set to that “/path/to/domain/wp-content/cache/” path.

    Thread Starter vespino

    (@vespino)

    The file shows: $cache_path = WP_CONTENT_DIR . ‘/cache/’;

    OK, and are you getting the “PHP Warning: file_exists(): open_basedir restriction in effect. File(/wp-cache-blog17f7c…” type warnings right now in your log files?

Viewing 15 replies - 1 through 15 (of 40 total)
  • The topic ‘open_basedir restriction’ is closed to new replies.