WordPress.org

Ready to get started?Download WordPress

Forums

W3 Total Cache
[resolved] Call to Undefined Function after Update (17 posts)

  1. Sarah F
    Member
    Posted 2 years ago #

    Ever since the update i am getting this error over and over again, almost every 3 seconds. I'm not too green with code but this i can not figure out at all. Can anyone help?

    [28-Aug-2011 01:49:30] PHP Fatal error: Call to undefined function w3_url_format() in /home/gamingex/public_html/wp-content/plugins/w3-total-cache/lib/W3/Plugin/PgCacheAdmin.php on line 213

    http://wordpress.org/extend/plugins/w3-total-cache/

  2. tgeorge
    Member
    Posted 2 years ago #

    I have exactly the same problem. I upgraded minutes ago to v0.9.2.4 and I already have 3 error messages in my (always empty) error_log :

    [28-Aug-2011 16:56:51] PHP Fatal error:  Call to undefined function w3_url_format() in /home/USERNAME/public_html/wp-content/plugins/w3-total-cache/lib/W3/Plugin/PgCacheAdmin.php on line 213
    [28-Aug-2011 17:18:39] PHP Fatal error:  Call to undefined function w3_url_format() in /home/USERNAME/public_html/wp-content/plugins/w3-total-cache/lib/W3/Plugin/PgCacheAdmin.php on line 213
    [28-Aug-2011 17:34:28] PHP Fatal error:  Call to undefined function w3_url_format() in /home/USERNAME/public_html/wp-content/plugins/w3-total-cache/lib/W3/Plugin/PgCacheAdmin.php on line 213

    I hope this gets corrected as soon as possible.

  3. tgeorge
    Member
    Posted 2 years ago #

    Well, I am not a PHP expert, but this should solve the problem. Open the problematic PgCacheAdmin.php, and after the line :

    require_once W3TC_INC_DIR . '/functions/rule.php';

    add :

    require_once W3TC_INC_DIR . '/functions/url.php';

    and cross your fingers :-)

  4. wp.Man
    Member
    Posted 2 years ago #

    thank you tgeorge! seems to have solved it

  5. a1wsn
    Member
    Posted 2 years ago #

    My logs were swamped, thanks tgeorge for the solution :)

  6. gooma2
    Member
    Posted 2 years ago #

    that did the trick. amazing how quickly that one error can turn into a 600 MB error log in 24 hours!

    Thanks so much tgeorge!

  7. stepquick
    Member
    Posted 2 years ago #

    Hmm I'm adding this to my post about W3T... it actually just gave me a weird issue today, which I resolved already. These support forums are really irreplaceable. Thanks for the info! :)

  8. Mike
    Member
    Posted 2 years ago #

    I just started getting these errors, too, starting a couple of days ago.

    1.) How could this error just pop-up on it's own out of nowhere, after having this version of W3TC installed and running fine for months?
    2.) I worry about modifying the plugin files. Is this a known issue in W3TC? I wonder if the author agrees with this fix. (Frederick, are you out there?)

    thanks,
    Mike

  9. AITpro
    Member
    Posted 2 years ago #

    This looks like a completely valid fix to me. ;)

    This fix makes sense because the w3_url_format function is defined in the /functions/url.php file. The only thing i did slightly differently was to add the require_once right above the foreach array, but of course anywhere in the file is the same thing. Nice one tgeorge. ;)

    /**
             * Make HTTP requests and prime cache
             */
            require_once W3TC_INC_DIR . '/functions/http.php';
    		require_once W3TC_INC_DIR . '/functions/url.php';
    
            foreach ($queue as $url) {
                $url = w3_url_format($url, array('w3tc_preload' => 1));
    
                w3_http_get($url);
            }
        }
  10. cyonite
    Member
    Posted 2 years ago #

    If you try Development version this should be fixed there. http://wordpress.org/extend/plugins/w3-total-cache/download/

  11. illegalprelude
    Member
    Posted 2 years ago #

    Stupid question but where is the "PgCacheAdmin.php"?

  12. AITpro
    Member
    Posted 2 years ago #

    /plugins/w3-total-cache/lib/W3/Plugin/PgCacheAdmin.php

  13. illegalprelude
    Member
    Posted 2 years ago #

    Thank you ATIpro

  14. rajupp
    Member
    Posted 2 years ago #

    Issue is more than 9 months old and not fixed officially yet? I still get these errors. I hope the fix mentioned above is the right one

  15. Simplii Web
    Member
    Posted 2 years ago #

    Doesnt look like this fix has been posted to the latest release. i just added it to my W3 plugin

  16. amatheson
    Member
    Posted 2 years ago #

    Thanks for this - fixed my "missed schedule" problem.

  17. O. G. Hippiechick
    Member
    Posted 2 years ago #

    Thank you so much for posting this fix. It was driving me nuts for nearly 3 days!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic