Title: [Plugin: WP Super Cache] mfunc issue
Last modified: August 20, 2016

---

# [Plugin: WP Super Cache] mfunc issue

 *  [wilsmex](https://wordpress.org/support/users/wilsmex/)
 * (@wilsmex)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-mfunc-issue/)
 * When I enable the plugin “htaccess” or “php” mode, everything loads okay up until
   the sidebar.
 * When I view the page source, there is an <!–mfunc–> and then nothing else following
   that. It appears php/page execution stops after this line…
 * I’ve got woocommerce plugin, and a customized theme running, but can’t for the
   life of me figure out what is going on…
 * Any ideas?
 * [http://wordpress.org/extend/plugins/wp-super-cache/](http://wordpress.org/extend/plugins/wp-super-cache/)

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

 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-mfunc-issue/#post-2894684)
 * Try enabling the late init option on the settings page.
 *  [Storm](https://wordpress.org/support/users/worldofstorm/)
 * (@worldofstorm)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-mfunc-issue/#post-2894834)
 * FAQ suggestion:
 * The FAQ says “_To execute WordPress functions you must define $wp\_super\_cache\
   _late\_init in your config file._“
 * Which config file? Where? How? Why? This is pretty confusing and misleading.
 * Suggestion: The FAQ should instead say you have to enable it on the Advanced 
   page. I had to find this forum post to learn this, because I didn’t remember 
   there was an option like that on the Advanced page….
 * Best wishes,
    Storm
 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [13 years, 10 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-mfunc-issue/#post-2894835)
 * Thanks. When that FAQ was written the advanced settings page option didn’t exist.
   I’ll update it.
 *  [Olaf Lederer](https://wordpress.org/support/users/finalwebsites/)
 * (@finalwebsites)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-mfunc-issue/#post-2894837)
 * Hi Donncha,
    I thought I got working, but not for 100%
 * My theme file includes a file and a function from that file is called later:
 *     ```
       <!--mclude wp-content/box-cache/switch-content-home.php-->
       <?php include_once( ABSPATH . 'wp-content/box-cache/switch-content-home.php' ); ?>
       <!--/mclude-->
   
       <!--mfunc showHTML()-->
       <?php showHTML() ?>
       <!--/mfunc-->
       ```
   
 * After the cache file is created I see exact the same code in that file (except
   for the file path, where the absolute path variable shows the value) Inside the
   included file I get different ads for a specific country.
 * I get the content from the showHTML() function at the moment that the page is
   generated, but the content is gone after the second page view.
    Does this sound
   familiar? I tried the function a second time in a simple way using this function:
 *     ```
       function showHTML() {
       	$somevar = 1;
       	echo ($somevar == 1) ? 'this is one' : 'this is not';
       }
       ```
   
 * But in that case I get the first message only once. If I access the cache file
   from the browser directly, it’s working. Seems like that the PHP code isn’t executed
   when the cache file is called by WordPress.
 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-mfunc-issue/#post-2894839)
 * Try putting a space before the “–>” string. Does that help?
 * Have you tried the “dynamic-cached-content” tag too?
 *  [Olaf Lederer](https://wordpress.org/support/users/finalwebsites/)
 * (@finalwebsites)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-mfunc-issue/#post-2894840)
 * Hi Donncha,
 * I tried them both, no success 🙁
    The strange thing is that my cache file looks
   100% good, it’s just the PHP code isn’t executed inside the PHP (cache) file.
 * Do you have a working example?
 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-mfunc-issue/#post-2894842)
 * Have you made sure that PHP executes when you view a cached page? Use the debug
   log, make sure the supercache rewrite rules aren’t in your .htaccess file.
 *  [Olaf Lederer](https://wordpress.org/support/users/finalwebsites/)
 * (@finalwebsites)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-mfunc-issue/#post-2894843)
 * Hi Donncha,
 * I removed the rules by myself and if I access the cache file directly everything
   is fine. If check the cache time stamp from the public url, I have the same cache
   file. It’s only the PHP part which isn’t executed. If you like I can create an
   example (I hoped you have an working example)
 *  Plugin Author [Donncha O Caoimh (a11n)](https://wordpress.org/support/users/donncha/)
 * (@donncha)
 * [13 years, 9 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-mfunc-issue/#post-2894846)
 * I don’t have a working example and since my site uses Varnish mfunc won’t work.
   You might need to debug the mfunc code in wp-cache-phase2.php with error_log 
   to figure out what’s going wrong.
 *  [Olaf Lederer](https://wordpress.org/support/users/finalwebsites/)
 * (@finalwebsites)
 * [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-mfunc-issue/#post-2894848)
 * Hi Donncha,
    I got it working and I think the problem was inside the (included)
   script. After the cached page was generated all the wordpress settings were missing(
   I guess). That’s the only explanation I have because suddenly it worked. Thanks
   for the help.

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

The topic ‘[Plugin: WP Super Cache] mfunc issue’ 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

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

 * 10 replies
 * 4 participants
 * Last reply from: [Olaf Lederer](https://wordpress.org/support/users/finalwebsites/)
 * Last activity: [13 years, 8 months ago](https://wordpress.org/support/topic/plugin-wp-super-cache-mfunc-issue/#post-2894848)
 * Status: not resolved