• Resolved wpu9000

    (@wpu9000)


    Hello, my website crashed with the error “Error establishing a database connection” . I contacted Cloudways and they said the problem was with the plugin Force Refresh and they provided the error logs below.

    [Sun Jul 04 22:04:46.301796 2021] [proxy_fcgi:error] [pid 17904:tid 139917367514880] [client 5.11.73.36:28158] AH01071: Got error ‘PHP message: PHP Warning: Constants may only evaluate to scalar values in /home/99705-76536.cloudwaysapps.com/xjbyqrugcr/public_html/wp-content/plugins/force-refresh/filter-force-refresh.php on line 30\n’, referer: https://www.whiterockgallery.com/michael-otoole-archive/

    [Sun Jul 04 22:04:48.466418 2021] [proxy_fcgi:error] [pid 17904:tid 139917291980544] [client 97.113.154.214:28162] AH01071: Got error ‘PHP message: PHP Warning: Constants may only evaluate to scalar values in /home/99705-76536.cloudwaysapps.com/xjbyqrugcr/public_html/wp-content/plugins/force-refresh/filter-force-refresh.php on line 30\n’, referer: https://www.whiterockgallery.com/new-arrivals/

    I was wondering if you could confirm that the plugin was the cause of the database connection problem. I am not sure how to resolve this issue as I can’t update to the latest version of your plugin because my WordPress site does not meet the new requirements listed for the latest version of Force Refresh.

    (by the way your plugin is great, it has made a huge difference to the site, before I was using Force Refresh clients were always complaining that they did not see updates and after using it they see the daily updates.)

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author jordanleven

    (@jordanleven)

    Hey @wpu9000! That error is not a MySQL error, that’s a PHP error. It sounds like you’re probably using PHP 5.6, which is unsupported. Can you see if this forum solves your issue?

    Thread Starter wpu9000

    (@wpu9000)

    Yes, I am using version 2.1 of your plugin, which I think was ok on PHP 5.6..

    Plugin Author jordanleven

    (@jordanleven)

    Ah, that might be an incorrect attribution in the documentation. 2.1 is not compatible with PHP 5.6. I generally try to keep the plugin compatible with older version of PHP but with 5.6 reaching end of life in 2018, there were some features I was losing out on by supporting it. Version 2.0, I believe, should work on 5.6 though.

    Thread Starter wpu9000

    (@wpu9000)

    This is from the plugins folder readme :

    === Force Refresh ===
    Contributors: jordanleven
    Tags: force, refresh, reload, single, page, application, ajax
    Requires at least: 4.0.0
    Tested up to: 5.2
    Stable tag: 2.1
    License: GPLv2 or later

    The header in the code also lists 2.1

    What I don’t understand is nothing has changed in the setup for the website in many months, so this error must have been there before?.. I wonder if it actually had anything to do with the database problem.

    How do I downgrade to 2.0?
    thank you

    Plugin Author jordanleven

    (@jordanleven)

    Hey @wpu9000,

    Yes, README is correct. It actually appears that support for PHP 5.6 is _not_ in that README folder (“Requires at least” and “Tested up to” refer to the WordPress versions that are required by every plugin).

    For the question about if the error was there before, that’s something you’d want to check with Cloudways about. What I can tell you authoritatively are two things:

    1. The error message you sent back is a PHP issue related to using an array in a constant definition which were not supported in PHP 5.6. Whether this is causing a fatal error that can be handled by the server is something I wouldn’t be able to tell but something that one of the backend people from Cloudways would be able to tell you.

    2. If you haven’t been updating Force Refresh, there is, from a technical standpoint, no way I can see that this error would just spring up. It’s possible the server configuration on Cloudways changed recently and that’s why you’re just noticing it. But if you haven’t changed anything on your end, there’s no way for this to spontaneously start happening _unless_ the plugin was updated from 2.0 to 2.1.

    Lastly, to download a specific version of Force Refresh, it’s the same process as any other plugin. Navigate to the Advanced section of the plugin, scroll down to “Previous Versions”, and replace the downloaded file on your server.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Database Error’ is closed to new replies.