Title: Critical error when plugin deactivated
Last modified: May 2, 2023

---

# Critical error when plugin deactivated

 *  Resolved [Joe Bloggs](https://wordpress.org/support/users/joe-bloggs/)
 * (@joe-bloggs)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/critical-error-when-plugin-deactivated/)
 * Hi there guys,
 * I was hoping you could please help me with the following error I’m getting when
   I try to deactivate the plugin:
 * Current plugin: Super Page Cache for Cloudflare (version 4.7.3)
   PHP version 8.2.5
 * Error Details
   =============An error of type E_ERROR was caused in line 3157 of
   the file /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/wp-cloudflare-
   page-cache/libs/cache_controller.class.php. Error message: Uncaught Error: Call
   to undefined function opcache_get_status() in /var/www/vhosts/domain.com/httpdocs/
   wp-content/plugins/wp-cloudflare-page-cache/libs/cache_controller.class.php:3157Stack
   trace:#0 /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/wp-cloudflare-
   page-cache/libs/cache_controller.class.php(693): SWCFPC_Cache_Controller->purge_opcache()#
   1 /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/wp-cloudflare-page-cache/
   libs/cache_controller.class.php(1167): SWCFPC_Cache_Controller->purge_all()#2/
   var/www/vhosts/domain.com/httpdocs/wp-content/plugins/wp-cloudflare-page-cache/
   wp-cloudflare-super-page-cache.php(1063): SWCFPC_Cache_Controller->reset_all()#
   3 /var/www/vhosts/domain.com/httpdocs/wp-includes/class-wp-hook.php(308): SW_CLOUDFLARE_PAGECACHE-
   >deactivate_plugin()#4 /var/www/vhosts/domain.com/httpdocs/wp-includes/class-
   wp-hook.php(332): WP_Hook->apply_filters()#5 /var/www/vhosts/domain.com/httpdocs/
   wp-includes/plugin.php(517): WP_Hook->do_action()#6 /var/www/vhosts/domain.com/
   httpdocs/wp-admin/includes/plugin.php(814): do_action()#7 /var/www/vhosts/domain.
   com/httpdocs/wp-admin/plugins.php(209): deactivate_plugins()#8 {main}thrown
 * My server log then gives me this error:
 * Code 499
   POST /wp-admin/admin-ajax.php?action=as_async_request_queue_runner&nonce
   =39619995f8 HTTP/2.0
 * Code: 500
   GET /wp-admin/plugins.php?action=deactivate&plugin=wp-cloudflare-page-
   cache%2Fwp-cloudflare-super-page-cache.php&plugin_status=all&paged=1&s&_wpnonce
   =9ced0b4273 HTTP/2.0
 * As well as this warning:
 * 429901#0: *941324 FastCGI sent in stderr: “PHP message: PHP Warning: Array to
   string conversion in /var/www/vhosts/domain.com/httpdocs/wp-includes/pluggable.
   php on line 2292; PHP message: PHP Fatal error: Uncaught Error: Call to undefined
   function opcache_get_status() in /var/www/vhosts/domain.com/httpdocs/wp-content/
   plugins/wp-cloudflare-page-cache/libs/cache_controller.class.php:3157
   Stack trace:#
   0 /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/wp-cloudflare-page-cache/
   libs/cache_controller.class.php(693): SWCFPC_Cache_Controller->purge_opcache()#
   1 /var/www/vhosts/domain.com/httpdocs/wp-content/plugins/wp-cloudflare-page-cache/
   libs/cache_controller.class.php(1167): SWCFPC_Cache_Controller->purge_all()#2/
   var/www/vhosts/domain.com/httpdocs/wp-content/plugins/wp-cloudflare-page-cache/
   wp-cloudflare-super-page-cache.php(1063): SWCFPC_Cache_Controller->reset_all()#
   3 /var/www/vhosts/domain.com/httpdocs/wp-includes/class-wp-hook.php(308): SW_CLOUDFLARE_PAGECACHE-
   >deactivate_plugin()#4 /var/www/vhosts/domain.com/httpdocs/wp-includes/class-
   wp-hook.php(332): WP_Hook->apply_filters()#5 /var/www/vhosts/domain.com/httpdocs/
   wp-includes/plugin.php(517): WP_Hook->do_action()” while reading response header
   from upstream
 * Any ideas what could be happing and how to fix it?
 * Many thanks,
 * Jo

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Contributor [iSaumya](https://wordpress.org/support/users/isaumya/)
 * (@isaumya)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/critical-error-when-plugin-deactivated/#post-16702976)
 * Hi [@joe-bloggs](https://wordpress.org/support/users/joe-bloggs/),
   Looking at
   the log it seems the issue is happening cause your server is not identifying 
   an in-built PHP function `opcache_get_status()`. Link: [https://www.php.net/manual/en/function.opcache-get-status.php](https://www.php.net/manual/en/function.opcache-get-status.php)
 * You should check why this function is not available in your server as it is a
   default PHP function. Maybe the function is disabled at the server level, if 
   so, please enable it.
 *  Thread Starter [Joe Bloggs](https://wordpress.org/support/users/joe-bloggs/)
 * (@joe-bloggs)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/critical-error-when-plugin-deactivated/#post-16705742)
 * Thanks [@isaumya](https://wordpress.org/support/users/isaumya/)
 * You’re right, the `opcache_get_status()` was indeed disabled as Plesk apparently
   disables the function by default for security reasons.
   I’ve now enabled the function
   and it looks like it resolved the error issue.
 * Thanks for your help.
 * Btw. just for your information, here is the reply I received from my Plesk support:
   
   _The reason why Plesk disabled the `opcache\_get\_status` PHP function by default
   starting from 17.8 version was due to the following two security points:_
    - On a shared hosting, since any customer is able to call [OPcache functions](http://php.net/manual/en/ref.opcache.php),
      by clearing out the cache using the function in question, an attacker customer
      can make the target customer have no benefits from caching;
    - Moreover, an attacker customer can see names of target’s cached PHP files.
 * It seems to be very valid point.
 * I wonder if there’s any other way your plugin could possibly function to, so 
   it doesn’t require the opache_get_status function to be enabled.
 * Thanks again,
 * Jo
 *  Plugin Contributor [iSaumya](https://wordpress.org/support/users/isaumya/)
 * (@isaumya)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/critical-error-when-plugin-deactivated/#post-16706154)
 * Hi [@joe-bloggs](https://wordpress.org/support/users/joe-bloggs/),
   Unfortunately
   no. You can try disabling the opcahe purge option inside the plugin settings (
   screenshot: [https://i.imgur.com/9SMANfp.jpeg](https://i.imgur.com/9SMANfp.jpeg))
   and then check if the plugin works with that opcache function being disabled.
 *  Thread Starter [Joe Bloggs](https://wordpress.org/support/users/joe-bloggs/)
 * (@joe-bloggs)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/critical-error-when-plugin-deactivated/#post-16709226)
 * No worries, thanks for your help [@isaumya](https://wordpress.org/support/users/isaumya/)
 * Just one last question before closing this.
 * Should I also consider using Redis object cache alongside Super Cache for Cloudflare,
   or does your plugin cover that side too and Redis is not necessary?
 * Thanks again, Jo
 *  Plugin Contributor [iSaumya](https://wordpress.org/support/users/isaumya/)
 * (@isaumya)
 * [3 years, 1 month ago](https://wordpress.org/support/topic/critical-error-when-plugin-deactivated/#post-16710023)
 * > Should I also consider using Redis object cache alongside Super Cache for Cloudflare,
   > or does your plugin cover that side too and Redis is not necessary?
 * Well, honestly speaking, you don’t need object cache for most content website.
   Moreover, as this plugin makes your webpages cached at CDN level, most non-logged
   in traffic will not be hitting your origin server anyways as the response will
   be served from the CDN server.
 * That being said, if you still need object caching in your website, you need to
   install Redis separately. As this is a pure page caching plugin and does not 
   provide object caching.
 * Hope this helps. 🙂

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Critical error when plugin deactivated’ is closed to new replies.

 * ![](https://ps.w.org/wp-cloudflare-page-cache/assets/icon-256x256.gif?rev=3234997)
 * [Super Page Cache – Cloudflare Cache, Page Speed & Core Web Vitals](https://wordpress.org/plugins/wp-cloudflare-page-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-cloudflare-page-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-cloudflare-page-cache/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [iSaumya](https://wordpress.org/support/users/isaumya/)
 * Last activity: [3 years, 1 month ago](https://wordpress.org/support/topic/critical-error-when-plugin-deactivated/#post-16710023)
 * Status: resolved