Title: [Plugin: WP Super Cache] PHP Fatal error:  Call to undefined function
Last modified: August 20, 2016

---

# [Plugin: WP Super Cache] PHP Fatal error: Call to undefined function

 *  [admintiger](https://wordpress.org/support/users/admintiger/)
 * (@admintiger)
 * [14 years ago](https://wordpress.org/support/topic/plugin-wp-super-cache-php-fatal-error-call-to-undefined-function-1/)
 * PHP just logged the following error at an offline test site where WP Super Cache
   has been running without problems. I am posting this information in case it sheds
   light on the cause of problems others have been having.
 * **The Logged Error**
    [01-Jun-2012 14:31:10] PHP Fatal error: Call to undefined
   function wp_cache_phase2_clean_expired() in C:\public\www.subsn.com\wp-content\
   plugins\wp-super-cache\wp-cache.php on line 2893
 * **Associated Conditions**
    Windows Server Apache 2.2.22 PHP 5.2.17 APC Opcode
   Caching enabled WordPress 3.4RC1 APC User Caching enabled via object-cache.php
   Autoptimize (my own custom version with various fixes) Super Cache current trunk
   version mod_rewrite Mode enabled All SC recommended options selected, except 
   preload was off 2583 pages cached (6 WordPress, the rest a custom post type)
 * The error occurred when I tried to load a new page that wasn’t cached. Firefox
   locked up. Firefox wasn’t functional even after closing and reopening it until
   I cleared its cache. Returning to the page locked-up Firefox again and its cache
   had to be cleared again.
 * Clearing the APC User cache didn’t clear the problem. Clearing the APC Opcode
   cache didn’t clear the problem.
 * Windows Task Manager indications on the server suggested that Apache was executing
   an endless loop. Restarting Apache cleared the problem. However, Apache took 
   about two minutes to stop, before it could be restarted, which is another indication
   that it was locked in a loop.
 * After restarting Apache I went back to the same uncached webpage with Firefox.
   Super Cache cached the page and it now displays normally.
 * My configuration is of course significantly different than others have and there
   are many potential issues outside of Super Cache. Even so, Super Cache has been
   running very reliably with this configuration during extensive stress-testing,
   so the error seems significant.
 * [http://wordpress.org/extend/plugins/wp-super-cache/](http://wordpress.org/extend/plugins/wp-super-cache/)

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

 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [13 years, 12 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-php-fatal-error-call-to-undefined-function-1/#post-2785947)
 * That should not happen at all as that function is loaded by the phase2 file. 
   🙁
 *  Thread Starter [admintiger](https://wordpress.org/support/users/admintiger/)
 * (@admintiger)
 * [13 years, 12 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-php-fatal-error-call-to-undefined-function-1/#post-2785955)
 * Yes, it does seem that should not happen, because the function does, in fact,
   exist, at least in a disk file, but not necessarily in memory when needed. The
   first thing I did after reading the error message was to verify that the function
   exists.
 * However, although I haven’t worked through the logic of everything going on, 
   on Line 2406 of wp-cache.php there is an if ‘function_exists’ conditional test
   to avoid a race-condition. There were operational indications of a race condition
   after PHP complained that ‘wp_cache_phase2_clean_expired()’ was undefined. Therefore,
   it seems that even though the function should have been loaded by the phase2 
   file, it must not have been defined in memory at the time of the error for some
   reason.

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

The topic ‘[Plugin: WP Super Cache] PHP Fatal error: Call to undefined function’
is closed to new replies.

 * ![](https://ps.w.org/wp-super-cache/assets/icon-256x256.png?rev=3506220)
 * [WP Super Cache](https://wordpress.org/plugins/wp-super-cache/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-super-cache/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-super-cache/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-super-cache/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-super-cache/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-super-cache/reviews/)

## Tags

 * [undefined function](https://wordpress.org/support/topic-tag/undefined-function/)

 * 2 replies
 * 2 participants
 * Last reply from: [admintiger](https://wordpress.org/support/users/admintiger/)
 * Last activity: [13 years, 12 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-php-fatal-error-call-to-undefined-function-1/#post-2785955)
 * Status: not resolved