WordPress.org

Support

Support » Plugins and Hacks » WP Super Cache » [Plugin: WP Super Cache] broken, let's fix

[Plugin: WP Super Cache] broken, let's fix

  • Weeks now and I’m stiull wanting to get thiw plug in to work. WEEKS

    Warning! WP Super Cache caching broken! The script advanced-cache.php could not load wp-cache-phase1.php.

    Please edit /home2/steveza1/public_html/blog/wp-content/advanced-cache.php and make sure the path to /home2/steveza1/public_html/blog/wp-content/plugins/wp-super-cache/wp-cache-phase1.php is correct.

    Do what? What does “make sure” mean? That’s like saying, Make sure you have the betsy hermosa gene. Do what?

    http://wordpress.org/extend/plugins/wp-super-cache/

Viewing 15 replies - 1 through 15 (of 18 total)
  • Hello.
    I have also the same error. This is the message I see in the dashboard.

    Warning! WP Super Cache caching broken! The script advanced-cache.php could not load wp-cache-phase1.php.

    Please edit /homepages/9/d429818722/htdocs/wp-content/advanced-cache.php and make sure the path to /homepages/9/d429818722/htdocs/wp-content/plugins/wp-super-cache/wp-cache-phase1.php is correct.

    Can anyone help? Thanks.

    Plugin Author Donncha O Caoimh

    @donncha

    Those are files on your server. You need to edit wp-content/advanced-cache.php and point it at wp-content/plugins/wp-super-cache/wp-cache-phase1.php.

    Unfortunately it has to be the full path from / as some hosts do really weird things and screw things up 🙁

    ok. it’s been 1/2 year or more, and I am still asking the question, what does “point to” mean? You must know? I see both files you note on my server. Now what? Please.
    Best regards, Steve Z

    Plugin Author Donncha O Caoimh

    @donncha

    Steve – look in that wp-content/advanced-cache.php and you’ll see wp-cache-phase1.php mentioned there.

    The path to wp-cache-phase1.php is wrong, you have to fix it. It should probably be “/homepages/9/d429818722/htdocs/wp-content/plugins/wp-super-cache/wp-cache-phase1.php”

    ok i asked for help from BlueHost on this. I was reluctant to ask them because it is not within their agreement to support such issues. Even so, we just deleted the plug in and reposted the plug in no problem. So why was this not suggested? Very simple. Wish I thought of it but I’m no tech nut.

    I had the same problem and I figured that out.

    Go to your wp-config.php (located at WordPress root) and fix the path here:

    define( ‘WPCACHEHOME’, ‘new-path-goes-here’ ); //Added by WP-Cache Manager

    If you want to know the current path, learn more here

    CarrieM

    @carriem

    Hello!

    I’m having this issue too. I have gone into wp-config.php and updated the path and advanced-cache.php and updated with the same path. I’m still getting the error so I must be doing something wrong.

    I’m using the following path:

    ‘/[long name of server_installation]/[http://public_url.com]/[folder]/content/wp-content/plugins/wp-super-cache/’

    Is there something in the way I’m entering the path that is causing the issues? I have tried without the server/installation name and just the url preceding the folder path, but that doesn’t seem to work either. I’ve tried removing the last forward slash, but that doesn’t help. The ‘long name of the server’ is coming out of the error message I’m getting from WP-Super Cache.

    I know just a tiny bit about coding, so any advice you have would be greatly appreciated!

    Thanks!

    Upgrading to:
    WP 3.5.1
    Super Cache 1.2

    @carriem,

    I was able to remove the Super Cache error message by using hieu.nguyen and Donncha’s posts.

    Open wp-config.php in your web root.

    Add this line, under the other defined lines

    define( 'WPCACHEHOME', 'path-goes-here' ); //Added by WP-Cache Manager

    The ‘path goes here’ is a full, absolute path to wp-cache-phase1.php

    There is no http:// in an absolute path.

    It should be something like:

    '/home/public_html/wp-content/plugins/wp-super-cache/'

    The path (ends with wp-super-cache) should be displayed in that error message on the dashboard.

    @donncha, why are users debugging these messages? 😉

    To me, the problem is cause by a change (by the hosting company) in the absolute path of the server. By following the instruction in the warning, I solve the problem. No need to touch the wp-config.php file.

    Open the file : /wp-content/advanced-cache.php
    Compare the absolute path written in that file with the one include in the warning message (in WordPress dashboard). The warning message is giving you the new path, use it to fix the one in the advanced-cache.php file.

    UPDATE :
    I found an important detail. The file “advanced-cache.php” that is located OUTSIDE the PLUGINS folder, that is to say in the WP-CONTENT folder is not updated when updating the plugin. So if you are using this plugin for a long time, it is possible that the code in this file differs from the current version (v1.2).

    In older versions (for example v0.8.9.1), the absolute path is written in it directly.

    <?php
    # WP SUPER CACHE 0.8.9.1
    function wpcache_broken_message() {
    	if ( false == strpos( $_SERVER[ 'REQUEST_URI' ], 'wp-admin' ) )
    		echo "<!-- WP Super Cache is installed but broken. The path to wp-cache-phase1.php in wp-content/advanced-cache.php must be fixed! -->";
    }
    
    if ( !include_once( '/YOUR ABSOLUTE PATH/wp-content/plugins/wp-super-cache/' . 'wp-cache-phase1.php' ) ) {
    	if ( !@is_file( '/YOUR ABSOLUTE PATH/wp-content/plugins/wp-super-cache/' . 'wp-cache-phase1.php' ) ) {
    		define( 'ADVANCEDCACHEPROBLEM', 1 );
    		register_shutdown_function( 'wpcache_broken_message' );
    	}
    }
    ?>

    In the new version (v1.2), that file only contains a link to the WordPress “wp-config.php”. So it would be better to update the contents of the “advanced-cache.php” found in WP-CONTENT folder with the following:

    <?php
    # WP SUPER CACHE 1.2
    function wpcache_broken_message() {
    	if ( false == strpos( $_SERVER[ 'REQUEST_URI' ], 'wp-admin' ) )
    		echo "<!-- WP Super Cache is installed but broken. The constant WPCACHEHOME must be set in the file wp-config.php and point at the WP Super Cache plugin directory. -->";
    }
    
    if ( false == defined( 'WPCACHEHOME' ) ) {
    	define( 'ADVANCEDCACHEPROBLEM', 1 );
    } elseif ( !include_once( WPCACHEHOME . 'wp-cache-phase1.php' ) ) {
    	if ( !@is_file( WPCACHEHOME . 'wp-cache-phase1.php' ) ) {
    		define( 'ADVANCEDCACHEPROBLEM', 1 );
    	}
    }
    if ( defined( 'ADVANCEDCACHEPROBLEM' ) )
    	register_shutdown_function( 'wpcache_broken_message' );
    ?>

    And then you can check your “wp-config.php” file (at the root of WordPress) if it contains the absolute path of your server (the warning message usually contain the old and the new absolute path of your server). The line should be like this (with your absolute path):

    define('WPCACHEHOME', '/YOUR ABSOLUTE PATH/wp-content/plugins/wp-super-cache/' ); //Added by WP-Cache Manager

    Hope this help.

    Just Remove the following line from your wp-config.php
    //////
    define(‘WPCACHEHOME’, ‘/YOUR ABSOLUTE PATH/wp-content/plugins/wp-super-cache/’ ); //Added by WP-Cache Manager
    /////
    It’s may be available at the first line.

    I was having the same issue. With WordPress 3.5.1 and WP Super Cache 1.2 you need to ignore the warning message instructions. You need to open your wp-config.php file in the root of your website.

    Add in this code:
    define( 'WPCACHEHOME', 'path-goes-here' ); //Added by WP-Cache Manager

    And the complete path is something like this:
    '/home/public_html/wp-content/plugins/wp-super-cache/'

    You do NOT need to include the file name: /wp-cache-phase1.php. It will just give you a bunch of error messages.

    That’s it!

    I hate to sound like an idiot, but I feel like I am trying to read a foreign language. I don’t know about code. I’m afraid to change anything for fear of causing more damage.

    It sounds like badkittystudios has figured out my same problem. However her solution doesn’t make sense to me and I don’t know any web savvy people. Can someone be so nice as to explain step by step what I should do. Thank you so much for your time and patience with us newbies!

    You can not solve this problem using the WordPress dashboard. You have to edit the files located in your server. Do you have access to the file manager of your server (in your hosting control panel)? Or do you use a FTP software?

    Not sure, I am using host gator. Do you know where I should look?

Viewing 15 replies - 1 through 15 (of 18 total)
  • The topic ‘[Plugin: WP Super Cache] broken, let's fix’ is closed to new replies.
Skip to toolbar