Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #44784
    Kiril Yovev
    Guest

    Hello BoldGrid Team! We are using t3 total cache on our site domain.com and yesterday we upgraded to PHP 7.4 and this error appeared so we had to switch it back:

    [09-Nov-2021 08:24:16 UTC] PHP Fatal error: Uncaught Error: Call to undefined function W3TC\json_decode() in /home/webselo/public_html/MyProjects/domain.com/wp-content/plugins/w3-total-cache/Config.php:61
    Stack trace:
    #0 /home/domain/public_html/MyProjects/domain.com/wp-content/plugins/w3-total-cache/Config.php(34): W3TC\Config::_util_array_from_storage(0, false)
    #1 /home/domain/public_html/MyProjects/domain.com/wp-content/plugins/w3-total-cache/Config.php(455): W3TC\Config::util_array_from_storage(0, false)
    #2 /home/domain/public_html/MyProjects/domain.com/wp-content/plugins/w3-total-cache/Config.php(127): W3TC\Config->load()
    #3 /home/domain/public_html/MyProjects/domain.com/wp-content/plugins/w3-total-cache/Dispatcher.php(16): W3TC\Config->__construct()
    #4 /home/domain/public_html/MyProjects/domain.com/wp-content/plugins/w3-total-cache/Dispatcher.php(26): W3TC\Dispatcher::component(‘Config’)
    #5 /home/domain/public_html/MyProjects/domain.com/wp-content/plugins/w3-total-cache/Mobile_Redirect.php(16): W3TC\Dispatcher::config()
    #6 /home/domain/public_html/MyProjects/domain.com/wp-content/plugins/w3-total-cache/Config.php on line 61

    ***
    So we restored to php 7.2

    1.
    We would like to buy w3 total cache pro for two of our sites but they should run on php 7.4. Do you know when you would be able to fix this issue?
    ***
    2. My second question is about the licensing of the software – if we purchase the plan of w3 total cache pro which costs $99 – can we use the software of our both domains? If not, do you offer plans which include 2-3 licenses, or discounts for additional license purchases?

    All best!

    Kiko

    #44804
    Marko Vasiljevic
    Keymaster

    Hello Kiril,

    I am sorry about the issue you are experiencing with W3 Total Cache when upgrading the PHP version and I am happy to assist you with this.
    It seems like a broken config JSON file. Are you able to download the json (Performance>General settings>Imort/export settings),
    Make sure to check wp-content/w3tc-config/master.php and see if the file is broken.
    If you added define( 'W3TC_CONFIG_DATABASE', true ); to wp-config.php and did not export the config settings before that, possibly the file is now broken when you try to download it.
    Potentially you need json_decode installed/enabled.
    W3 Total Cache doesn’t work without json_encode and json_decode, and errors like that may show up when those functions are not defined, which means either the JSON extension is not installed/enabled or it doesn’t work.
    He should check the output of phpinfo(); for something similar to this:
    json info in phpinfo
    Create a phpinfo.php in the root of yoru website and add the following line of code:

    <?php
    
    phpinfo( );
    
    ?>

    Once this is done, make sure to open your website https://yourwebstie.com/phpinfo.php and check the json support and version as shown in the screenshot.

    As for the questions regarding the license, please contact us directly via the plugin in Performance>Support>Sales so I can share the bulk licensing plans we have to offer at the moment.

    I hope this helps!
    Thanks!

    #44813
    Kiril Yovev
    Guest

    Hello Marko,

    I was able to export the json file from the settings of the plugin and I uploaded it here for you so you can take a look:

    https://dox.abv.bg/download?id=e2bc04d988# – Download Link

    ***

    “Make sure to check wp-content/w3tc-config/master.php and see if the file is broken.”
    I just took a look at this file and it looks just fine. I’m attaching it here as well:
    https://dox.abv.bg/download?id=7a65b2d28d# – Download link

    ***

    “If you added define( ‘W3TC_CONFIG_DATABASE’, true ); to wp-config.php and did not export the config settings before that, possibly the file is now broken when you try to download it.”

    We’ve never done that.

    I just created a phpinfo.php file that contains the function phpinfo(); – here it is:
    https://webselo.com/phpinfo.php
    It looks that json is supported – could you kindly confirm that?

    What are the further steps so we can fix this issue? Thank you very much for you kind assistance.

    I will ask your support about the paid version of the software and the licensing that we need for our software and for clients as well.

    thx!

    #44822
    Marko Vasiljevic
    Keymaster

    Hello Kiril,

    Thank you for the information.
    Yes, everything seems to be in order. It appears that you may be missing php7.4-json on your server so I would advise checking this.
    After installing the package/PECL module, you should either restart Apache or PHP-FPM.
    We’ve received your email regarding the W3TC Pro plans and replied.

    I hope this helps!
    Thanks!

    #44835
    Kiril Yovev
    Guest

    Hello Marko,
    thank you for your help!

    “Yes, everything seems to be in order. It appears that you may be missing php7.4-json on your server so I would advise checking this.”

    I just asked the hosting provider about that and will be back to you soon.

    Also, few minutes ago I answered to your colleagues about the licensing and we’re almost done there :))

    All Best!

    Kiko

    #44855
    Marko Vasiljevic
    Keymaster

    Hello Kiril,

    Thank you for the information.
    I’ve sent you the links for the bulk activation plans.
    Let me know the information about php7.4-json when you get a reply from your hosting provider.
    Thanks!

    #44859
    Kiril Yovev
    Guest

    Hello Marko,

    the hosting provider just confirmed that it’s all fine.

    Could you please check if it’s Ok now so we can try to upgrade to php 7.4?

    All Best!

    Kiko

    #44873
    Marko Vasiljevic
    Keymaster

    Hello Kiril,

    I’ve checked the phpinfo.php and the PHP version is Version 7.4.25 and as I can see your website is working as expected.
    Can you please confirm if you are still experiencing the issue?
    Thanks!

    #44876
    Kiril Yovev
    Guest

    Hello Marko, it is Ok now, thanks to you and to the hosting guys.

    Should I write here about the licensing as soon as the clients that I’ve asked answer to me or maybe one the email? I guess that I’ll be needing a week or something like that because sometimes the people do not respond as soon as we would like them to answer :))

    Thank you :))

    Kio

    #44901
    Marko Vasiljevic
    Keymaster

    Hello Kiril,

    Thank you for the information and I am glad that the problem is now resolved.
    As for the licensing, please use the existing email chain, or drop us a note once you have information from the clients. This is a public forum so it’s best to keep any sensitive information away from the forum.

    Thanks!

    #44913
    Kiril Yovev
    Guest

    Hello Marko, it looks that the issue is still not resolved.

    I noticed that there was a critical error and we switched again to php 7.4 -> 7.2.

    Would you be so kind to take a look at the error_log from the root of the domains? There is something related to the plugin:

    https://dox.abv.bg/download?id=6610263ecb#

    Is this a compatibility issue?

    All Best :))

    Kiko

    P.S. One of the clients confirm that he will take a license. We are waiting for a confirmation from the other people 🙂

    #44920
    Marko Vasiljevic
    Keymaster

    Hello Kiril,

    Thank you for your feedback.
    Just to confirm, the error occurs once you downgraded the PHP to 7.2?
    Can you please confirm if you are using OC and DB Caching and caching to Disk?
    Thanks!

    #44926
    Kiril Yovev
    Guest

    Hello Marko,

    these errors appeared when we switched do php 7.4. It seems that the white screen error appeared but we did not notice it at first.

    “Can you please confirm if you are using OC and DB Caching and caching to Disk?”

    I’m not sure what are you referring to so here’s a screenshot of the options that are enabled:
    Disk Enhanced
    https://prnt.sc/1z6gasy

    More options:
    https://prnt.sc/1z6gevf

    And some more of them:
    https://prnt.sc/1z6gh82

    Maybe you were referring to this one: “Object Cache Method:”? If so, the selected option is “Disk”.

    No problem :))

    All best!

    Kiko

    #44968
    Marko Vasiljevic
    Keymaster

    Hello Kiril,

    Thank you for the information.
    It’s not recommended to use the Disk Caching method for Object Caching and Database Caching especially if you are on a shared server. SO you should consider using Redis or Memcached. Please note that you need to install PHP Redis extension or PHP Memcached extension for the W3 Total Cache to recognize them and make them available in the plugin settings.
    The error you are referring to suggests that there is an error in the query. Disabling Database caching should solve the problem, and you should also try to purge the database cache and check the MySQL table.
    I hope this helps!

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Error on PHP 7.4 upgrade’ is closed to new replies.