WordPress.org

Forums

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

  1. Simon Blackbourn
    Member
    Posted 4 years 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 4 years 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. Simon Blackbourn
    Member
    Posted 4 years 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 4 years ago #

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

  5. Donncha O Caoimh
    Member
    Plugin Author

    Posted 4 years 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. Simon Blackbourn
    Member
    Posted 4 years 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

  • WP Super Cache
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic