• I am trying to use the <!--mfunc code to allow a dynamic function to show ads that rotate on each page view (oiopublisher) but it breaks the site.

    I add the code to above and below the function that shows ads as explained on the faq page but as soon as I do, the site will show one page fine and on the next viewing it will die with a blank screen with this error

    Error 330 (net::ERR_CONTENT_DECODING_FAILED): Unknown error.

    so I switch page compression off and it will show the page again but on the next viewing, it will only load the page up until the <!--mfunc--> (if I view the source).

    this happens on my live server and on my testing server.

    what can I do to use a dynamic function to show a rotating list of links using php?. I really don’t want to use a javascript call.

Viewing 14 replies - 1 through 14 (of 14 total)
  • Try enabling the late_init feature. More on the developers documentation.

    Thread Starter teamplaylotto

    (@teamplaylotto)

    thanks donncha, that worked as far as letting a dynamic function still remain dynamic on a cached page but unfortunately, it still wont allow compression to be enabled which I would really like.

    Is there another magic setting I can try to get compression playing nice?

    You’ll have to set the compression on in php.ini. The cache files are stored uncompressed when you use the mfunc stuff, as PHP needs to execute the code in the cache file, and it can’t do that if it’s compressed!

    I may see if compressing the output on the fly is worth it. It will take up CPU cycles on each request but will save bandwidth.

    Thread Starter teamplaylotto

    (@teamplaylotto)

    that was it!!

    I was kinda wondering how it would be able to see the dynamic function and execute it if the file was already compressed.

    It works just dandy after I edited php.ini to have zlib.output_compression = On, it caches the page and the function stays dynamic (I tested it with echo date('H i s',time()); in a function and I can see from the headers that the page is gzipped and the time shown within <!--mfunc--> tags is up to date and the time shown from the call to the function below the tags shows the time when it was cached.

    I am happy. Thanks so much for taking the time to be patient with me donncha.

    Thread Starter teamplaylotto

    (@teamplaylotto)

    [update] it definitely works on my local install but on my live server, it doesn’t ??

    I understand it wont be super cache’s fault because the same file on my local shows the dynamic function output but on my live server it just doesn’t show the output at all.

    this is what is in my source code of the template file

    <!--mfunc echo 'mfunc enclosed time = '.date('H i s',time()); -->
    <?php echo 'mfunc enclosed time = '.date('H i s',time()); ?>
    <!--/mfunc-->
    <br />
    <?php echo 'template time = '.date('H i s',time());?>

    viewing the source of a cached page, it shows this..

    <!--mfunc-->
    <?php echo 'mfunc enclosed time = '.date('H i s',time());  ;?>
    <!--/mfunc-->
    <br />
    template time = 17 08 49

    what could be different on my live server that would cause the extra ; ?

    you can see it in action in the footer of https://comluv.com

    I appreciate all you’re doing to help donncha

    The extra “;” comes from line 431 of wp-cache-phase2.php, no need for a “;” in your template tag.

    Not sure why it works one place and not the other though. ??

    Thread Starter teamplaylotto

    (@teamplaylotto)

    Ok, took off the offending ;

    some progress..

    If I clear the checkbox for ‘don’t cache pages for logged on users’ in the settings page then the mfunc code gets treated properly.

    I delete cache files and delete expired and the footer shows..

    mfunc enclosed time = 11 31 42
    template time = 11 31 42

    on a refresh, it shows

    mfunc enclosed time = 10 32 01
    template time = 11 31 42

    so the function in the mfunc tags suddenly shows 1 hour less but at least it is showing something.

    could this be an issue with my server time settings? I expect that might make choosing a cache file problematic if it’s time was different to the server..

    Switching off ‘dont cache files for logged on users’ seems to make things work so maybe I should be thankful for small mercies (although the geek in me cant stand not knowing why!)

    thanks Donncha

    Thread Starter teamplaylotto

    (@teamplaylotto)

    another update.

    It seems the super cache plugin has an issue related to cookies.

    It wont work for a brand new visitor. They need to have a cookie set for mfunc to execute the dynamic function.

    I just tried on a new pc that hadn’t visited my site before and the mfunc enclosed function did not run. I logged in and then logged out and the function showed the output like it was supposed to.

    after clearing cookies on the machine, the function does not show any output at all.

    Thread Starter teamplaylotto

    (@teamplaylotto)

    sorry to keep posting here but I’ve a way for you or anyone to replicate this cookie problem..

    visit https://comluv.com and see the entries in the footer area about the mfunc enclosed time and template time.

    if you’ve never been there before (or if you have, clear cookies), you’ll only see one for the template time but, if you leave a comment then you get a cookie saved to your pc and then any page views will show both the mfunc enclosed time and the template time.

    I think this might make it a bit easier to find the bug that is causing the issue..

    Thread Starter teamplaylotto

    (@teamplaylotto)

    here’s a dump of the log file , I broke it up into 4 steps

    [view page with cleared history]

    20:33:57 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ No wp-cache file exists. Must generate a new one.
    21:33:58 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ In WP Cache Phase 2
    21:33:58 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Setting up WordPress actions
    21:33:58 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Created output buffer
    21:33:58 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ supercache dir: /var/www/vhosts/comluv.com/httpdocs/wp-content/cache/supercache/comluv.com/newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/
    21:33:58 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ scheduled wp_cache_gc for 10 seconds time.
    21:33:58 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Output buffer callback
    21:33:58 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ supercache dir: /var/www/vhosts/comluv.com/httpdocs/wp-content/cache/supercache/comluv.com/newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/
    21:33:58 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Anonymous user detected. Only creating Supercache file.
    21:33:58 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Dynamic content found in buffer.
    21:33:58 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Renamed temp supercache file to /var/www/vhosts/comluv.com/httpdocs/wp-content/cache/supercache/comluv.com/newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/index.html
    21:33:58 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Sending buffer to browser
    20:33:59 /files/2010/06/nothing.gif No wp-cache file exists. Must generate a new one.
    20:33:59 /files/2010/05/hong_kong_advertising.jpg No wp-cache file exists. Must generate a new one.
    20:33:59 /files/2009/07/footer-links1.png No wp-cache file exists. Must generate a new one.
    20:33:59 /files/2010/05/import-blogger-blog.png No wp-cache file exists. Must generate a new one.
    20:33:59 /files/2010/03/125×125-banner.jpg No wp-cache file exists. Must generate a new one.
    20:34:01 /news/official-cash-contest/ No wp-cache file exists. Must generate a new one.
    21:34:02 /news/official-cash-contest/ In WP Cache Phase 2
    21:34:02 /news/official-cash-contest/ Setting up WordPress actions
    21:34:02 /news/official-cash-contest/ Created output buffer
    21:34:02 /news/official-cash-contest/ supercache dir: /var/www/vhosts/comluv.com/httpdocs/wp-content/cache/supercache/comluv.com/news/official-cash-contest/
    21:34:02 /news/official-cash-contest/ Output buffer callback
    21:34:02 /news/official-cash-contest/ supercache dir: /var/www/vhosts/comluv.com/httpdocs/wp-content/cache/supercache/comluv.com/news/official-cash-contest/
    21:34:02 /news/official-cash-contest/ Anonymous user detected. Only creating Supercache file.
    21:34:02 /news/official-cash-contest/ Dynamic content found in buffer.
    21:34:02 /news/official-cash-contest/ Renamed temp supercache file to /var/www/vhosts/comluv.com/httpdocs/wp-content/cache/supercache/comluv.com/news/official-cash-contest/index.html
    21:34:02 /news/official-cash-contest/ Sending buffer to browser

    mfunc and non mfunc show same time value

    [fill in comment form and submit]

    21:34:30 /wp-comments-post.php In WP Cache Phase 2
    21:34:30 /wp-comments-post.php Setting up WordPress actions
    21:34:30 /wp-comments-post.php Not caching POST request.
    21:34:31 /wp-comments-post.php Post change: deleting cache files in /var/www/vhosts/comluv.com/httpdocs/wp-content/cache/supercache/comluv.com/
    21:34:31 /wp-comments-post.php wp_cache_post_id_gc clearing cache in /var/www/vhosts/comluv.com/httpdocs/wp-content/cache/supercache/comluv.com//newsletter/ads-credits-donations-and-more-for-comluv-in-june/.
    21:34:31 /wp-comments-post.php rebuild_or_gc: rename to /var/www/vhosts/comluv.com/httpdocs/wp-content/cache/supercache/comluv.com//newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/index.html.needs-rebuild
    21:34:31 /wp-comments-post.php wp_cache_post_id_gc clearing cache in /var/www/vhosts/comluv.com/httpdocs/wp-content/cache/supercache/comluv.com/page/.
    21:34:31 /wp-comments-post.php rebuild_or_gc: deleted /var/www/vhosts/comluv.com/httpdocs/wp-content/cache/supercache/comluv.com/feed/index.html
    21:34:31 /wp-comments-post.php rebuild_or_gc: deleted /var/www/vhosts/comluv.com/httpdocs/wp-content/cache/supercache/comluv.com/feed/index.html.gz
    21:34:31 /wp-comments-post.php Post 1017 changed. Update cache.
    20:34:31 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Cookie detected: comment_author_comluvau73
    20:34:31 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Cookie detected: comment_author_email_comluvau73
    20:34:31 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Cookie detected: comment_author_url_comluvau73
    20:34:31 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ No wp-cache file exists. Must generate a new one.
    21:34:32 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Cookie detected: comment_author_comluvau73
    21:34:32 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Cookie detected: comment_author_email_comluvau73
    21:34:32 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Cookie detected: comment_author_url_comluvau73
    21:34:32 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ In WP Cache Phase 2
    21:34:32 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Setting up WordPress actions
    21:34:32 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Created output buffer
    21:34:32 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Cookie detected: comment_author_comluvau73
    21:34:32 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Cookie detected: comment_author_email_comluvau73
    21:34:32 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Cookie detected: comment_author_url_comluvau73
    21:34:32 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Output buffer callback
    21:34:32 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ supercache dir: /var/www/vhosts/comluv.com/httpdocs/wp-content/cache/supercache/comluv.com/newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/
    21:34:32 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Cookie detected: comment_author_comluvau73
    21:34:32 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Cookie detected: comment_author_email_comluvau73
    21:34:32 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Cookie detected: comment_author_url_comluvau73
    21:34:32 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Cookie detected: comment_author_comluvau73
    21:34:32 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Cookie detected: comment_author_email_comluvau73
    21:34:32 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Cookie detected: comment_author_url_comluvau73
    21:34:32 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Dynamic content found in buffer.
    21:34:32 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Renamed temp wp-cache file to /var/www/vhosts/comluv.com/httpdocs/wp-content/cache/blogs/comluv.com/wp-cache-comluv.com9cd6c4a9b4932ea07c8619a866e2bc05.html
    21:34:32 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Sending buffer to browser
    21:34:32 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Writing meta file: /var/www/vhosts/comluv.com/httpdocs/wp-content/cache/blogs/comluv.com/meta/wp-cache-comluv.com9cd6c4a9b4932ea07c8619a866e2bc05.meta
    20:34:33 /news/official-cash-contest/ Cookie detected: comment_author_comluvau73
    20:34:33 /news/official-cash-contest/ Cookie detected: comment_author_email_comluvau73
    20:34:33 /news/official-cash-contest/ Cookie detected: comment_author_url_comluvau73
    20:34:33 /news/official-cash-contest/ No wp-cache file exists. Must generate a new one.
    21:34:34 /news/official-cash-contest/ Cookie detected: comment_author_comluvau73
    21:34:34 /news/official-cash-contest/ Cookie detected: comment_author_email_comluvau73
    21:34:34 /news/official-cash-contest/ Cookie detected: comment_author_url_comluvau73
    21:34:34 /news/official-cash-contest/ In WP Cache Phase 2
    21:34:34 /news/official-cash-contest/ Setting up WordPress actions
    21:34:34 /news/official-cash-contest/ Created output buffer
    21:34:34 /news/official-cash-contest/ Cookie detected: comment_author_comluvau73
    21:34:34 /news/official-cash-contest/ Cookie detected: comment_author_email_comluvau73
    21:34:34 /news/official-cash-contest/ Cookie detected: comment_author_url_comluvau73
    21:34:34 /news/official-cash-contest/ Output buffer callback
    21:34:34 /news/official-cash-contest/ supercache dir: /var/www/vhosts/comluv.com/httpdocs/wp-content/cache/supercache/comluv.com/news/official-cash-contest/
    21:34:34 /news/official-cash-contest/ Cookie detected: comment_author_comluvau73
    21:34:34 /news/official-cash-contest/ Cookie detected: comment_author_email_comluvau73
    21:34:34 /news/official-cash-contest/ Cookie detected: comment_author_url_comluvau73
    21:34:34 /news/official-cash-contest/ Cookie detected: comment_author_comluvau73
    21:34:34 /news/official-cash-contest/ Cookie detected: comment_author_email_comluvau73
    21:34:34 /news/official-cash-contest/ Cookie detected: comment_author_url_comluvau73
    21:34:34 /news/official-cash-contest/ Dynamic content found in buffer.
    21:34:34 /news/official-cash-contest/ Renamed temp wp-cache file to /var/www/vhosts/comluv.com/httpdocs/wp-content/cache/blogs/comluv.com/wp-cache-comluv.come42d06ffb1a6be5302bbb0b74b5e2354.html
    21:34:34 /news/official-cash-contest/ Sending buffer to browser
    21:34:34 /news/official-cash-contest/ Writing meta file: /var/www/vhosts/comluv.com/httpdocs/wp-content/cache/blogs/comluv.com/meta/wp-cache-comluv.come42d06ffb1a6be5302bbb0b74b5e2354.meta

    mfunc and non mfunch show same time value

    [refresh page]

    20:35:33 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Cookie detected: comment_author_comluvau73
    20:35:33 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Cookie detected: comment_author_email_comluvau73
    20:35:33 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Cookie detected: comment_author_url_comluvau73
    20:35:33 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ wp-cache file exists
    20:35:33 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Serving wp-cache dynamic file
    20:35:33 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ exit request
    20:35:34 /files/2010/06/nothing.gif Cookie detected: comment_author_comluvau73
    20:35:34 /files/2010/06/nothing.gif Cookie detected: comment_author_email_comluvau73
    20:35:34 /files/2010/06/nothing.gif Cookie detected: comment_author_url_comluvau73
    20:35:34 /files/2010/06/nothing.gif No wp-cache file exists. Must generate a new one.
    20:35:34 /files/2010/05/hong_kong_advertising.jpg Cookie detected: comment_author_comluvau73
    20:35:34 /files/2010/05/hong_kong_advertising.jpg Cookie detected: comment_author_email_comluvau73
    20:35:34 /files/2010/05/hong_kong_advertising.jpg Cookie detected: comment_author_url_comluvau73
    20:35:34 /files/2010/05/hong_kong_advertising.jpg No wp-cache file exists. Must generate a new one.
    20:35:34 /files/2009/07/footer-links1.png Cookie detected: comment_author_comluvau73
    20:35:34 /files/2009/07/footer-links1.png Cookie detected: comment_author_email_comluvau73
    20:35:34 /files/2009/07/footer-links1.png Cookie detected: comment_author_url_comluvau73
    20:35:34 /files/2009/07/footer-links1.png No wp-cache file exists. Must generate a new one.
    20:35:35 /files/2010/05/import-blogger-blog.png Cookie detected: comment_author_comluvau73
    20:35:35 /files/2010/05/import-blogger-blog.png Cookie detected: comment_author_email_comluvau73
    20:35:35 /files/2010/05/import-blogger-blog.png Cookie detected: comment_author_url_comluvau73
    20:35:35 /files/2010/05/import-blogger-blog.png No wp-cache file exists. Must generate a new one.
    20:35:35 /files/2010/03/125×125-banner.jpg Cookie detected: comment_author_comluvau73
    20:35:35 /files/2010/03/125×125-banner.jpg Cookie detected: comment_author_email_comluvau73
    20:35:35 /files/2010/03/125×125-banner.jpg Cookie detected: comment_author_url_comluvau73
    20:35:35 /files/2010/03/125×125-banner.jpg No wp-cache file exists. Must generate a new one.
    20:35:39 /news/official-cash-contest/ Cookie detected: comment_author_comluvau73
    20:35:39 /news/official-cash-contest/ Cookie detected: comment_author_email_comluvau73
    20:35:39 /news/official-cash-contest/ Cookie detected: comment_author_url_comluvau73
    20:35:39 /news/official-cash-contest/ wp-cache file exists
    20:35:39 /news/official-cash-contest/ Serving wp-cache dynamic file
    20:35:39 /news/official-cash-contest/ exit request

    mfunc shows latest time, non mfunc shows last value previous to refresh

    [clear cache and refresh]

    20:37:09 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ No wp-cache file exists. Must generate a new one.
    21:37:10 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ In WP Cache Phase 2
    21:37:10 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Setting up WordPress actions
    21:37:10 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Created output buffer
    21:37:10 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ supercache dir: /var/www/vhosts/comluv.com/httpdocs/wp-content/cache/supercache/comluv.com/newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/
    21:37:10 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Rebuild file deleted
    21:37:10 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Output buffer callback
    21:37:10 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ supercache dir: /var/www/vhosts/comluv.com/httpdocs/wp-content/cache/supercache/comluv.com/newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/
    21:37:10 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Anonymous user detected. Only creating Supercache file.
    21:37:10 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Dynamic content found in buffer.
    21:37:10 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Renamed temp supercache file to /var/www/vhosts/comluv.com/httpdocs/wp-content/cache/supercache/comluv.com/newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/index.html
    21:37:10 /newsletter/ads-credits-donations-and-more-for-comluv-in-june/comment-page-1/ Sending buffer to browser
    20:37:11 /files/2010/06/nothing.gif No wp-cache file exists. Must generate a new one.
    20:37:11 /files/2010/05/hong_kong_advertising.jpg No wp-cache file exists. Must generate a new one.
    20:37:11 /files/2009/07/footer-links1.png No wp-cache file exists. Must generate a new one.
    20:37:11 /files/2010/05/import-blogger-blog.png No wp-cache file exists. Must generate a new one.
    20:37:11 /files/2010/03/125×125-banner.jpg No wp-cache file exists. Must generate a new one.
    20:37:49 /files/2010/06/nothing.gif No wp-cache file exists. Must generate a new one.
    20:37:50 /files/2010/05/hong_kong_advertising.jpg No wp-cache file exists. Must generate a new one.
    20:37:50 /files/2009/07/footer-links1.png No wp-cache file exists. Must generate a new one.
    20:37:50 /files/2010/05/import-blogger-blog.png No wp-cache file exists. Must generate a new one.

    only the non mfunch time is shown, mfunc function does not appear.

    [switch off logging]

    21:39:00 /wp-admin/wpmu-admin.php?page=wpsupercache Cookie detected: wordpress_comluvau73
    21:39:00 /wp-admin/wpmu-admin.php?page=wpsupercache Cookie detected: wordpress_test_cookie
    21:39:00 /wp-admin/wpmu-admin.php?page=wpsupercache Cookie detected: wordpress_logged_in_comluvau73
    21:39:00 /wp-admin/wpmu-admin.php?page=wpsupercache In WP Cache Phase 2
    21:39:00 /wp-admin/wpmu-admin.php?page=wpsupercache Setting up WordPress actions
    21:39:00 /wp-admin/wpmu-admin.php?page=wpsupercache Not caching wp-admin requests.

    Thread Starter teamplaylotto

    (@teamplaylotto)

    last message I promise.

    I updated the supercache plugin (in mu-plugins) to the latest version and now logged out/no cookie behaviour looks like it shows a brand new page on every visit. the time value in the footer always updates.

    mfunc enclosed time = 16 04 36
    template time = 16 04 36

    if I log in and log out or leave a comment then it shows this

    mfunc enclosed time = 15 05 03
    template time = 16 04 36

    the mfunc code suddenly shows date(‘H i s’,time()) as one hour previous. No idea why.

    I give up.

    The time difference is because your server time and WordPress time are different so it is working.

    Thread Starter teamplaylotto

    (@teamplaylotto)

    I see it is working in some cases but I’ve removed it altogether now as an anonymous user would not see the function that was wrapped in mfunc tags which is what I needed for a rotating ads script.

    Without the mfunc tags working, the ads don’t rotate until the next expire and advertisers were complaining that they couldn’t see their own ads even after a refresh. Even worse, if they didn’t have a cookie set by the site, they wouldn’t see the ads at all because the function wouldn’t run, it would get echo’d out to the page as text.

    never mind, the site speed seems to be ok without it. If speed becomes an issue, I’ll look into it again.

    thanks for helping

    The best way to rotate those ads and serve them to anonymous users is by using Javascript, just like Google Adsense does. They work just fine on completely static html pages.

Viewing 14 replies - 1 through 14 (of 14 total)
  • The topic ‘[Plugin: WP Super Cache] dynamic function code mfunc breaks the site’ is closed to new replies.