tlovett1 / simple-cache

A simple caching plugin for WordPress.
https://wordpress.org/plugins/simple-cache/
129 stars 33 forks source link

Site inaccessible to visitors after 1.7 update #92

Closed nicolinuxfr closed 4 years ago

nicolinuxfr commented 5 years ago

After having updated my WordPress site to Simple Cache 1.7 yesterday, the site was inaccessible to visitors. As I was connected as an admin, it worked fine and I did not notice the problem for several hours.

It was a PHP error, as indicated by my server logs :

 thrown in /var/www/voiretmanger.fr/wp-content/plugins/simple-cache/inc/dropins/file-based-page-cache.php on line 59
20/Jan/2019:19:15:59 +0100 [ERROR 0 /index.php] PHP message: PHP Fatal error:  Uncaught Error: Call to undefined function sc_url_exception_match() in /var/www/voiretmanger.fr/wp-content/plugins/simple-cache/inc/dropins/file-b$
Stack trace:
#0 /var/www/voiretmanger.fr/wp-content/advanced-cache.php(15): include_once()
#1 /var/www/voiretmanger.fr/wp-settings.php(84): include('/var/www/voiret...')
#2 /var/www/voiretmanger.fr/wp-config.php(172): require_once('/var/www/voiret...')
#3 /var/www/voiretmanger.fr/wp-load.php(37): require_once('/var/www/voiret...')
#4 /var/www/voiretmanger.fr/wp-blog-header.php(13): require_once('/var/www/voiret...')
#5 /var/www/voiretmanger.fr/index.php(17): require('/var/www/voiret...')
#6 {main}

The fix was to disable the plugin and then enable it again. I saw an error related to the wp-config.php file but the error was fixable by the plugin itself and now everything is working again.

Let me know if you need more information.

alx359 commented 5 years ago

Had the same error. Quick-fixed it like this:

\plugins\simple-cache\inc\dropins\file-based-page-cache.php line 60 From this: if ( sc_url_exception_match( $exception, $regex ) ) { To this: if ( function_exists('sc_url_exception_match') && sc_url_exception_match( $exception, $regex ) )

And this (line 66):

sc_serve_file_cache();
ob_start( 'sc_file_cache' );

To this:

if ( function_exists('sc_serve_file_cache') ) {
    sc_serve_file_cache();
    ob_start( 'sc_file_cache' );
}
larssandergreen commented 5 years ago

I also experienced this problem on one of two sites that I use Simple Cache on. Site was down (500 Error) immediately after upgrade. Not only was the site down, but PHP processes were sometimes using all of the server CPU and causing issues for other sites on the server.

Disabling and re-enabling fixed the issue.

acal commented 5 years ago

Like @larssg-wildsight Disabling and re-enabling fixed it for me ... at least for now! Thanks to @alx359 for finding a fix for the developers to implement in the next update of the plugin! If disable/re-enable doesn't work for you then this is the way to go until the next update is released.

t-pabla commented 5 years ago

I also experienced this problem on my site Disabling and re-enabling fixed it for me.

tlovett1 commented 4 years ago

Should be fixed in 1.7.1