Forums

WP Super Cache
[resolved] Errors shown at top of cached pages (6 posts)

  1. Lumpysimon
    Member
    Posted 1 year ago #

    Hi

    I am seeing the following error at the top of every page if I turn caching on:

    Warning: preg_match() [function.preg-match]: Compilation failed: nothing to repeat at offset 0 in /var/www/mydomainnameishere.com/public/htdocs/wp-content/plugins/wp-super-cache/wp-cache-phase2.php on line 177

    I've tried flushing the cache, etc., all to no avail. I have had to turn caching off for now.

    Any ideas what could be causing this?

    Thanks
    Simon

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

  2. Donncha O Caoimh
    Member
    Plugin Author

    Posted 1 year ago #

    Check line 177 of that file and see what variable it's referring to. It should be fairly simple to track down which option on the settings page is missing.

  3. Lumpysimon
    Member
    Posted 1 year ago #

    it's in the wp_cache_is_rejected function:

    foreach ( $cache_rejected_uri as $expr ) {
    		if( $expr != '' && preg_match( "~$expr~", $uri ) )
    			return true;
    	}

    doesn't really tell me much to be honest...

  4. thenets
    Member
    Posted 1 year ago #

    I have the same problem. My site is http://thenets.org/phelip

  5. Donncha O Caoimh
    Member
    Plugin Author

    Posted 1 year ago #

    OK, look for the "Accepted Filenames & Rejected URIs" section on the advanced settings page. Usually it has the following but maybe you removed them:

    wp-.*\.php
    index\.php

    It's only a warning, harmless. You should turn "display errors" off in your PHP config, or get your hosting to do that because you might be leaking important info to visitors to your site.

  6. Lumpysimon
    Member
    Posted 1 year ago #

    Those filenames were in place, but thanks for the heads-up on display_errors - bit embarrassing that my PHP config had that set to on!

    I uninstalled WPSC, cleared out all options, cache, etc, reinstalled and now all is fine again.

    Thanks for your help,
    Simon

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic