• 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/

Viewing 2 replies - 1 through 2 (of 2 total)
  • That should not happen at all as that function is loaded by the phase2 file. 🙁

    Thread Starter admintiger

    (@admintiger)

    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.