Support » Plugin: WP Super Cache » WP Super Cache, advanced-cache.php already exists

  • Warning!
    The file /home3/zlgabriel/public_html/wp-content/advanced-cache.php already exists. Please manually delete it before using this plugin.

    I get it fixed deleting the file, but after I do any modification to the page, the error message comes back and I have to delete the file again.

    The page I need help with: [log in to see the link]

Viewing 15 replies - 1 through 15 (of 15 total)
  • Plugin Author Donncha Ó Caoimh

    (@donncha)

    Can you check if wp-content/advanced-cache.php has the strings “WP SUPER CACHE 0.8.9.1” or “WP SUPER CACHE 1.2”? Or can it be read by your web server? That warning message only shows if the advanced-cache.php wasn’t created by WP Super Cache.

    Compare the advanced-cache.php in wp-content/ with the one in wp-content/plugins/wp-super-cache/ – they should be the same.

    Hi

    I have the same problem. The file public_html/wp-content/advanced-cache.php already exists. Please manually delete it before using this plugin.

    “I get it fixed deleting the file, but after I do any modification to the page, the error message comes back and I have to delete the file again.”

    Same here.

    • This reply was modified 1 month, 3 weeks ago by  saphiro.

    Hi

    I have the same problem. The file public_html/wp-content/advanced-cache.php already exists. Please manually delete it before using this plugin.

    “I get it fixed deleting the file, but after I do any modification to the page, the error message comes back and I have to delete the file again.”

    Plugin Author Donncha Ó Caoimh

    (@donncha)

    @saphiro @angelord38 As I said above:

    Can you check if wp-content/advanced-cache.php contains the strings “WP SUPER CACHE 0.8.9.1” or “WP SUPER CACHE 1.2”? Or can it be read by your web server? That warning message only shows if the advanced-cache.php wasn’t created by WP Super Cache.

    Compare the advanced-cache.php in wp-content/ with the one in wp-content/plugins/wp-super-cache/ – they should be the same.

    Hi Donncha

    ‘wp-content/advanced-cache.php’ contains the string WP SUPER CACHE 1.2

    ‘advanced-cache.php’ in wp-content and ‘wp-content/plugins/wp-super-cache/’ are the same.

    Now the plugin gives the error. “Sorry, You Are Not Allowed to Access This Page”

    Same error this morning for us as well. Can’t access plugin settings.

    wp-content/advanced-cache.php already exists. Please manually delete it before using this plugin

    1. Looking at the advanced-cache.php file, the file is empty (0 bytes)
    2. We have another cache file from wp-super-cache called wp-cache-config.php that is 4.72KB. Should we just copy the contents from wp-cache-config.php and paste it in advanced-cache.php?

    wp-cache-config.php file contents:

    application/x-httpd-php wp-cache-config.php  ( PHP script text) 
    
    <?php
    /*
    WP-Cache Config Sample File
    
    See wp-cache.php for author details.
    */
    
    $wpsc_fix_164 = 1;
    $wp_super_cache_comments = 1;
    $wpsc_last_post_update = 1507771780; //Added by WP-Cache Manager
    $wp_cache_debug_username = '5be78c3ffc75ce06f23f3cad0131948f';
    $wp_cache_mobile_groups = '';
    $wp_cache_home_path = '/'; //Added by WP-Cache Manager
    $wp_cache_slash_check = 1;
    $cache_page_secret = 'dc8253e80fde2dddb267e1c1ead47340'; //Added by WP-Cache Manager
    $cache_time_interval = '1800';
    if ( ! defined('WPCACHEHOME') )
    	define( 'WPCACHEHOME', WP_CONTENT_DIR . "/plugins/wp-super-cache/" ); //Added by WP-Cache Manager
    
    $cache_compression = 1;
    $cache_enabled = true;
    $super_cache_enabled = true;
    $cache_max_time = 7200;
    //$use_flock = true; // Set it true or false if you know what to use
    $cache_path = WP_CONTENT_DIR . '/cache/';
    $file_prefix = 'wp-cache-';
    $ossdlcdn = 0;
    
    // Array of files that have 'wp-' but should still be cached
    $cache_acceptable_files = array( 'wp-comments-popup.php', 'wp-links-opml.php', 'wp-locations.php' );
    
    $cache_rejected_uri = array('wp-.*\\.php', 'index\\.php');
    $cache_rejected_user_agent = array ( 0 => 'bot', 1 => 'ia_archive', 2 => 'slurp', 3 => 'crawl', 4 => 'spider', 5 => 'Yandex', 6 => 'Googlebot', 7 => 'Bingbot', 8 => 'Feedfetcher-Google', );
    
    $cache_rebuild_files = 1;
    
    // Disable the file locking system.
    // If you are experiencing problems with clearing or creating cache files
    // uncommenting this may help.
    $wp_cache_mutex_disabled = 1;
    
    // Just modify it if you have conflicts with semaphores
    $sem_id = 1913487897; //Added by WP-Cache Manager
    
    if ( '/' != substr($cache_path, -1)) {
    	$cache_path .= '/';
    }
    
    $wp_cache_mobile = 0;
    $wp_cache_mobile_whitelist = 'Stand Alone/QNws';
    $wp_cache_mobile_browsers = '2.0 MMP, 240x320, 400X240, AvantGo, BlackBerry, Blazer, Cellphone, Danger, DoCoMo, Elaine/3.0, EudoraWeb, Googlebot-Mobile, hiptop, IEMobile, KYOCERA/WX310K, LG/U990, MIDP-2., MMEF20, MOT-V, NetFront, Newt, Nintendo Wii, Nitro, Nokia, Opera Mini, Palm, PlayStation Portable, portalmmm, Proxinet, ProxiNet, SHARP-TQ-GX10, SHG-i900, Small, SonyEricsson, Symbian OS, SymbianOS, TS21i-10, UP.Browser, UP.Link, webOS, Windows CE, WinWAP, YahooSeeker/M1A1-R2D2, iPhone, iPod, iPad, Android, BlackBerry9530, LG-TU915 Obigo, LGE VX, webOS, Nokia5800';
    
    // change to relocate the supercache plugins directory
    $wp_cache_plugins_dir = WPCACHEHOME . 'plugins';
    // set to 1 to do garbage collection during normal process shutdown instead of wp-cron
    $wp_cache_shutdown_gc = 0;
    $wp_super_cache_late_init = 1;
    
    // uncomment the next line to enable advanced debugging features
    $wp_super_cache_advanced_debug = 0;
    $wp_super_cache_front_page_text = '';
    $wp_super_cache_front_page_clear = 0;
    $wp_super_cache_front_page_check = 0;
    $wp_super_cache_front_page_notification = '0';
    
    $wp_cache_object_cache = 0;
    $wp_cache_anon_only = 0;
    $wp_supercache_cache_list = 0;
    $wp_cache_debug_to_file = 0;
    $wp_super_cache_debug = 0;
    $wp_cache_debug_level = 5;
    $wp_cache_debug_ip = '';
    $wp_cache_debug_log = '8a0fbb923c23e65d2aff1461bf6fc4d0.php';
    $wp_cache_debug_email = '';
    $wp_cache_pages[ "search" ] = 1;
    $wp_cache_pages[ "feed" ] = 1;
    $wp_cache_pages[ "category" ] = 1;
    $wp_cache_pages[ "home" ] = 0;
    $wp_cache_pages[ "frontpage" ] = 0;
    $wp_cache_pages[ "tag" ] = 1;
    $wp_cache_pages[ "archives" ] = 1;
    $wp_cache_pages[ "pages" ] = 0;
    $wp_cache_pages[ "single" ] = 0;
    $wp_cache_pages[ "author" ] = 0;
    $wp_cache_hide_donation = 0;
    $wp_cache_not_logged_in = 1;
    $wp_cache_clear_on_post_edit = 1;
    $wp_cache_hello_world = 0;
    $wp_cache_mobile_enabled = 1;
    $wp_cache_cron_check = 1; //Added by WP-Cache Manager
    $wp_cache_mfunc_enabled = 1;
    $wp_cache_make_known_anon = 1;
    $wp_cache_refresh_single_only = 0;
    $wp_cache_mod_rewrite = 0;
    $wp_supercache_304 = 1;
    $wp_cache_front_page_checks = 1;
    $wp_cache_disable_utf8 = 0;
    $wp_cache_no_cache_for_get = 1;
    $cache_scheduled_time = '00:00';
    $wp_cache_preload_interval = 0;
    $cache_schedule_type = 'time';
    $wp_cache_preload_posts = 'all';
    $wp_cache_preload_on = 0;
    $wp_cache_preload_taxonomies = 0;
    $wp_cache_preload_email_me = 1;
    $wp_cache_preload_email_volume = 'less';
    $wp_cache_mobile_prefixes = 'w3c , w3c-, acs-, alav, alca, amoi, audi, avan, benq, bird, blac, blaz, brew, cell, cldc, cmd-, dang, doco, eric, hipt, htc_, inno, ipaq, ipod, jigs, kddi, keji, leno, lg-c, lg-d, lg-g, lge-, lg/u, maui, maxo, midp, mits, mmef, mobi, mot-, moto, mwbp, nec-, newt, noki, palm, pana, pant, phil, play, port, prox, qwap, sage, sams, sany, sch-, sec-, send, seri, sgh-, shar, sie-, siem, smal, smar, sony, sph-, symb, t-mo, teli, tim-, tosh, tsm-, upg1, upsi, vk-v, voda, wap-, wapa, wapi, wapp, wapr, webc, winw, winw, xda , xda-';
    $cached_direct_pages = array(  );
    $wpsc_served_header = false;
    $cache_gc_email_me = 0;
    $wpsc_save_headers = 0;
    $cache_schedule_interval = 'hourly';
    ?>

    Update. I did find advanced-cache.php archived file from March 25th. Can we just replace this one with the current one that is empty and 0 bytes?

    <?php
    # WP SUPER CACHE 1.2
    function wpcache_broken_message() {
    	global $wp_cache_config_file;
    	if ( isset( $wp_cache_config_file ) == false )
    		return '';
    
    	$doing_ajax =     defined( 'DOING_AJAX' ) && DOING_AJAX;
    	$xmlrpc_request = defined( 'XMLRPC_REQUEST' ) && XMLRPC_REQUEST;
    	$rest_request =   defined( 'REST_REQUEST' ) && REST_REQUEST;
    	$robots_request = strpos( $_SERVER[ 'REQUEST_URI' ], 'robots.txt' ) != false;
    
    	$skip_output = ( $doing_ajax || $xmlrpc_request || $rest_request || $robots_request);
    	if ( false == strpos( $_SERVER[ 'REQUEST_URI' ], 'wp-admin' ) && !$skip_output ) {
    		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' );
    ?>
    Plugin Author Donncha Ó Caoimh

    (@donncha)

    @totalmotorcycle – yes. Doing that will fix the problem. You can also copy it from wp-content/plugins/wp-super-cache/advanced-cache.php too.

    Plugin Author Donncha Ó Caoimh

    (@donncha)

    @saphiro – Are you having trouble accessing other admin pages? The plugin doesn’t do anything to modify user permissions so I’m not sure why you’re getting the message saying you’re not allowed visit that page.

    @donncha – Thank you that worked! I used the one you said from the /plugins/wp-super-cache folder. When I went back into WP Super Cache I had this message at the top of the screen but I clicked on “update”, the page reloaded and the message went away.

    WP_CACHE constant added to wp-config.php
    If you continue to see this warning message please see point 5 of the Troubleshooting Guide. The WP_CACHE line must be moved up.

    Thank you for your quick support, much appreciated!

    Hi
    @donncha I don’t know. Since I tried to update it all this odd errors appears.

    Today I tried it again and this time it said the plugin was deactivated due to an error. The plugin doesn’t exist.

    I rolled back to the previous version.

    “Are you having trouble accessing other admin pages?”

    @donncha No, the error appeared when I tried to see the plugin settings

    • This reply was modified 1 month, 2 weeks ago by  saphiro.
    Plugin Author Donncha Ó Caoimh

    (@donncha)

    @saphiro – Does caching work ok using the older version of the plugin? Can you contact your hosting support and ask them to check the advanced-cache.php on your site?
    Do they do anything that might cause problems for caching plugins like WP Super Cache. Some hosts have their own caching that stops this plugin working. Give them the link to this thread.

    The piece of code that checks the advanced-cache.php is here:
    https://github.com/Automattic/wp-super-cache/pull/666/files#diff-d5e23b1d94909d6b8f2281f18d119027R2575

    Hey there,
    I’m having this problem too. I can’t access the admin pages to roll back to the older version, and nor can I access the plugin page to delete the plugin, update any other plugins, or do anything at all now.
    Any help would be greatly appreciated…

    When I go to the plugins page, I get this error:

    Warning!
    The file /home/DOMAIN/public_html/wp-content/advanced-cache.php already exists. Please manually delete it before using this plugin. If you continue to see this message after deleting it please contact your hosting support.

    Query Monitor
    The message above was triggered by wp-super-cache.

    Call stack:

    do_action(‘admin_notices’)
    wp-admin/admin-header.php:281
    wp_cache_admin_notice()
    wp-includes/class-wp-hook.php:286
    wp_cache_create_advanced_cache()
    wp-content/plugins/wp-super-cache/wp-cache.php:3221
    wp_die()
    wp-content/plugins/wp-super-cache/wp-cache.php:2609

Viewing 15 replies - 1 through 15 (of 15 total)
  • You must be logged in to reply to this topic.