• Resolved kda406

    (@kda406)


    On a fresh install of W3 Total Cache on WordPress 4.7.1, as soon as I install and navigate or install and activate, I get this error:
    Fatal error: Uncaught Error: Call to undefined function W3TC\json_decode() in /var/www/clients/client1/web1/web/wp-content/plugins/w3-total-cache/Config.php:38 Stack trace: #0 /var/www/clients/client1/web1/web/wp-content/plugins/w3-total-cache/Config.php(359): W3TC\Config::util_array_from_file('/var/www/client...') #1 /var/www/clients/client1/web1/web/wp-content/plugins/w3-total-cache/Config.php(108): W3TC\Config->load() #2 /var/www/clients/client1/web1/web/wp-content/plugins/w3-total-cache/Dispatcher.php(16): W3TC\Config->__construct() #3 /var/www/clients/client1/web1/web/wp-content/plugins/w3-total-cache/Dispatcher.php(24): W3TC\Dispatcher::component('Config') #4 /var/www/clients/client1/web1/web/wp-content/plugins/w3-total-cache/Mobile_Redirect.php(16): W3TC\Dispatcher::config() #5 /var/www/clients/client1/web1/web/wp-content/plugins/w3-total-cache/Dispatcher.php(16): W3TC\Mobile_Redirect->__construct() #6 /var/www/clients/client1/web1/web/wp-content/advanced-cache.php(31): W3TC\Dispatcher::component('Mobile_Redirect') in /var/www/clients/client1/web1/web/wp-content/plugins/w3-total-cache/Config.php on line 38
    I have to SSH in and delete /wp-content/plugins/w3-total-cache to get the website working again.
    -Kyle

Viewing 3 replies - 1 through 3 (of 3 total)
  • Fatal error: Uncaught Error: Call to undefined function W3TC\json_decode()

    Does the json module show up in your phpinfo() output?

    • This reply was modified 7 years, 10 months ago by nigro.simone.
    • This reply was modified 7 years, 10 months ago by nigro.simone.

    Although it should be installed and compiled into PHP by default, it seems the json extension isnt being picked up. When you type php -m in CLI do u see json mentioned in the list?

    If you have cPanel installed jump to the PHP Version section and enable the json extension.

    Thread Starter kda406

    (@kda406)

    Indeed json was not listed in php -m. 51 other modules were listed, but json is not included by default with PHP 7.1. I used yum to install php_json and now W3-Total-Cache works. WordPress and the other 27 plugins in this small site did not require json to work correctly.

    I urge the developers that a test for json availability be added since it is required for this plugin and it is not included in PHP 7.1 by default.

    Thanks very much for your help!
    -Kyle

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal error after update to 4.7.1’ is closed to new replies.