I’m getting this error when trying to activate the plugin:
Fatal error: Uncaught TypeError: unlink(): Argument #2 ($context) must be of type resource or null, bool given in /public_html/wp-content/plugins/simple-cache/inc/class-sc-config.php:182 Stack trace: #0 /public_html/wp-content/plugins/simple-cache/inc/class-sc-config.php(182): unlink(‘/home7/ … /…’, true) #1 /public_html/wp-content/plugins/simple-cache/simple-cache.php(105): SC_Config->write(Array) #2 /public_html/wp-includes/class-wp-hook.php(308): sc_activate(”) #3 /public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters(”, Array) #4 /public_html/wp-includes/plugin.php(517): WP_Hook->do_action(Array) #5 /public_html/wp-admin/plugins.php(194): do_action(‘activate_simple…’) #6 {main} thrown in?/public_html/wp-content/plugins/simple-cache/inc/class-sc-config.php?on line?182
An email came about cache failure:
by deactivating:
Simple Cache has encountered the following error(s):
Simple Cache could not write advanced-cache.php to your wp-content directory or the file has been tampered with. Either click "Attempt Fix" or add the following code manually to wp-content/advanced-cache.php:
<?php
defined( 'ABSPATH' ) || exit;
define( 'SC_ADVANCED_CACHE', true );
if ( is_admin() ) { return; }
$plugin_path = defined( 'WP_PLUGIN_DIR' ) ? WP_PLUGIN_DIR : WP_CONTENT_DIR . '/plugins/';
include_once( $plugin_path . '/simple-cache/inc/pre-wp-functions.php' );
$GLOBALS['sc_config'] = sc_load_config();
if ( empty( $GLOBALS['sc_config'] ) || empty( $GLOBALS['sc_config']['enable_page_caching'] ) ) { return; }
if ( @file_exists( $plugin_path . '/simple-cache/inc/dropins/file-based-page-cache.php' ) ) { include_once( $plugin_path . '/simple-cache/inc/dropins/file-based-page-cache.php' ); }
Fix attempt causes another one failure ??
]]>I install the plugin and i get the following error. Any help with that ?
Fatal error: Uncaught TypeError: unlink(): Argument #2 ($context) must be of type resource or null, bool given in /home/domain/public_html/wp-content/plugins/simple-cache/inc/class-sc-config.php:182 Stack trace: #0 /home/domain/public_html/wp-content/plugins/simple-cache/inc/class-sc-config.php(182): unlink() #1 /home/domain/public_html/wp-content/plugins/simple-cache/simple-cache.php(105): SC_Config->write() #2 /home/domain/public_html/wp-includes/class-wp-hook.php(307): sc_activate() #3 /home/domain/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #4 /home/domain/public_html/wp-includes/plugin.php(476): WP_Hook->do_action() #5 /home/domain/public_html/wp-admin/plugins.php(194): do_action() #6 {main} thrown in /home/domain/public_html/wp-content/plugins/simple-cache/inc/class-sc-config.php on line 182
On almost all sites from I can’t no more activate. Only on one page plugin is working properly ??
Fatal error:
`Fatal error: Uncaught TypeError: unlink(): Argument #2 ($context) must be of type resource or null, bool given in /var/www/vhosts/istok.de/vitarianer.com/wp-content/plugins/simple-cache/inc/class-sc-config.php:182 Stack trace: #0 /var/www/vhosts/istok.de/vitarianer.com/wp-content/plugins/simple-cache/inc/class-sc-config.php(182): unlink() #1 /var/www/vhosts/istok.de/vitarianer.com/wp-content/plugins/simple-cache/simple-cache.php(105): SC_Config->write() #2 /var/www/vhosts/istok.de/vitarianer.com/wp-includes/class-wp-hook.php(307): sc_activate() #3 /var/www/vhosts/istok.de/vitarianer.com/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters() #4 /var/www/vhosts/istok.de/vitarianer.com/wp-includes/plugin.php(476): WP_Hook->do_action() #5 /var/www/vhosts/istok.de/vitarianer.com/wp-admin/plugins.php(194): do_action() #6 {main} thrown in /var/www/vhosts/istok.de/vitarianer.com/wp-content/plugins/simple-cache/inc/class-sc-config.php on line 182
Btw: Black menu covers almost fully this support site ??
]]>Getting really good results on Apache running websites, but can’t get it working on a website hosted on a Nginx server. Any experiences form others regarding Nginx and this plugin? Does it require a special set-up?
]]>Hi,
I have Simple cache installed and I am experiencing conflicts with other plugins.
1. Wordfence.
Regular visitors are getting access restricted page and are unable to visit the site.
I even get the message when I try to log in while my IP is whitelisted in Wordfene.
I contacted Wordfence developers and they investigated.
Said this conflict has been there previously and is due to a cache error.
2. Ultimate member.
There is another error where visitors are unable to click on links in the member box.
Simple cache is currently disabled due to the fact that some visitors are blocked.
]]>When you have other dropin as object-cache.php,
even when redis object caching is disabled in SimpleCache settings,
plugin is killing code inside object-cache.php and disabling object caching.
-rw-r--r-- 1 user group 0 Apr 2 17:07 object-cache.php
^^ size is set to zero, all code is removed.
Author, please make SimpleCache not to interfere with object-cache.php
especially when object caching is disabled on SimpleCache side.
PS:
Also on deactivation and removal object-cache.php gets removed. Even if it does not belong to this plugin.
If you have a security plugin protecting files, Simple Cache cannot add the needed line in wp-config.php.
Please note the plugin as of 02-17-2021 has a syntax error in the recommended line to add.
Plugin reads:
define( “WP_CACHE”, true );
Should read:
define( ‘WP_CACHE’, true );
*single quotation marks
]]>I’m finding that my site is much slower if I activate object caching. With normal Page Caching on, I am seeing document load times at around half a second. If I also activate object caching, load times go up to around 10 seconds (document only).
I get the same response if I set memcache or memcached as my object cache. Redis does not work on my server. I can see in phpinfo that memcache and memcached are both installed and active.
I am not seeing any errors in the php-fpm or nginx error logs. Does anyone know how I can debug this problem?
The site is not publicly accessible, so I cannot share the URL.
]]>Is it possible to modify the memcached endpoint so as to use an external server or service, or is this strictly limited to the local memcached process?
]]>Just like 7.0, this 7.1 also does not purge cache when clicked “Purge Cache” button in the dashboard.
]]>Hello.
I have used this plugin for years, but after the last update I received white pages on whole site, and after turning on debug mode I see the following error:
Fatal error: Uncaught Error: Call to undefined function sc_serve_file_cache() in /path-to-wordpress-pligins-folder/simple-cache/inc/dropins/file-based-page-cache.php:66 Stack trace: #0 /path-to-wordpress-site/content/advanced-cache.php(15): include_once() #1 /path-to-wordpress-site/wp-settings.php(84): include('/path-to-root-directory/...') #2 /path-to-wordpress-site/wp-config.php(175): require_once('/path-to-root-directory/...') #3 /path-to-wordpress-site/wp-load.php(37): require_once('/path-to-root-directory/...') #4 /path-to-wordpress-site/wp-blog-header.php(13): require_once('/path-to-root-directory/...') #5 /path-to-wordpress-site/index.php(17): require('/path-to-root-directory/...') #6 {main} thrown in /path-to-wordpress-pligins-folder/simple-cache/inc/dropins/file-based-page-cache.php on line 66
So far, I’ve just deactivated the plugin. Is it possible to solve the problem without disabling the plugin?
]]>Hello, i’ve installed the plugin + autoptimized plugin.
site – https://otaku.bg/
I cannot see any change in load. Anyone can tell me if it works?
https://prntscr.com/m8hwqj
https://prntscr.com/m8hwvs
hi,
memcache is not maintained anymore. do you have any plans to support memcached instead memcache?
]]>Hi,
Simple Cache will be work properly at this sub-folder WordPress website https://kleinburd.ru/news/ ? I mean that the whole WordPress website is in this sub-directory /news/. Check, please.
Sincerely, Valentine Kleinburd
CEO of Kleinburd Digital Agency
Will this new version allow multiple instances on the same server? Before it didn’t.
THANK YOU SO MUCH FOR THE UPDATE! LOVE THIS PLUGIN!
]]>Hi Taylor,
First of, major props for this lightweight and very clear cache solution.
I am really liking it combined with Autoptimize I must say (I have been using WP Rocket for … well a long time but it became a hassle to get good speeds with it every now and again).
I was wondering what your thoughts might be on enabling / offering logged in user cache.
Just now I spotted the code in /simple-cache/inc/dropins/file-based-page-cache.php where you check if a user is logged in.
And while I get that, this does make the caching useless for sites with multiple user groups (as in normal users and more elevated ones) Having an option to use this would be wonderful. You could then offer user specific cache.
You could use a similar approach as Wp-Rocket;
/cache/simple-cache/www.domain.com
/cache/simple-cache/www.domain.com_[nice_username]
Is that something you might consider implementing?
Kind regards,
Patrick Dankers
Hi
I have problems logging in to the console of my site. When I click on the link to get to the console I see a 500 error
then I wrote in support of my hosting and they replied that the error is related to the file [28-Feb-2018 05:15:37 UTC] PHP Fatal error: Call to undefined function is_404 () in … / plugins / simple-cache /inc/dropins/file-based-page-cache-functions.php on line 24
If I deactivate the plugin, i see the broke connection to the site database appears on the screen.
How to return the site to working condition and not to abandon your plugin? Thank you
Talking about getting frustrated. Tried to turn Simple Cache on, and received a non-useful error message:
wp-content/advanced-cache.php was edited or deleted. Simple Cache is not able to utilize page caching.
I am expecting SC to create this file for itself, permissions are fine. Clicking the Fix
button, just redisplays the same error message. Hmmm.
This plugin seems to add an empty wp-content/object-cache.php
when no memory caching service is available..
This will disable object caching completely and makes admin very slow.
Along with Memcached module for PHP,
there is also Igbinary and opcache (PHP7).
these could be made useable in the similar way to memcached.
hopefully this may be helpful.
Thanks
Does anyone have a preferences between Memcached or Redis for Object Caching and why would you choose one over the other?
]]>Hi,
When viewing my website my mobile, the page mysite.com/cart, I realized some items in the cart, and when I tried to remove them they were not removed. Then I opened another mobile phone which was having a different IP and I realized that there were same contents.
I didn’t have this problem in desktop, my cart was empty. (Weird!)
Later I was still not sure of this issue, so I decided to delete the cache, and saw that this changed my cart content, and it saved the last cart contents.
I believe that there are some issues with the cart page and contents, I had to change to a different plugin but wanted you to be aware.
I didn’t do much tests, so sorry for not giving too much details or screenshots.
]]>Is there a way to enable caching and compression via wp-cli?
]]>I am useing multisite.
Showing this error message while I set wp_debug to true.
How can I fix this?
]]>Hi Talor, I noticed a few months back thatsometimes, some of my site’s posts appears to not have the stylesheet working.
Then I found out if clear the cache of “simlecache” plugins, the stylesheets begins to work fine.
Any thought?
]]>Hi!
My name is ?sa and I work for Wordfence. We recently had a customer contact us about an issue where it seems like Wordfence block pages were cached by Simple Cache. We have looked at the code and it seems like Simple Cache caches everything that is not a WordPress search, 404 or a password protected post. This means that error, maintenance, block etc. could end up getting cached. Would you consider building in a check for response codes to ensure that pages that return response codes 500, 503, 403 etc. are not cached? Perhaps just verifying that the response code is 200 would suffice. Feel free to get in touch with me directly via [email protected] if you want to discuss it or if you need more information.
Thanks in advance!
]]>Hello,
When using Redis in memory caching, Simple Cache use standard the Redis Database number 0.
Is it possible to change this Redis Database number to 1, 2, etc.? And how to do that?
Because now I can’t using Simple Cache on a second WordPress website on the same webserver with memory caching with Redis. Simple Cache will use the same Redis database 0 so, this will result in the same cache content from the first website.
Is there a configuration option to indicate that Simple Cache can use with Redis an other database then the default number 0?
There is another plugin “Redis Object Cache By Till Krüss” where you can adjust the connection parameters by define some constants in the wp-config.php file such as: WP_REDIS_DATABASE. This is a good solution. Is that also possible?
Thanks in advance.
Best Regards.
I need to Try this Plugin but I need to Be sure first. Does it leave any Leftovers in Database or cpanel that need to be cleaned manually Should I Need to Use another Plugin? Thank you
]]>Taylor hello:
I am using your plug in. Thanks. Seems OK, although I did not get too scientific with my benchmarks.
I think I know the answer, but your plugin does not perform any Minification, right?
Would need a separate plugin for this?
thanks, GSH2000
]]>