PHP Compatibility Checker raises issues for PHP above v5.6

[ad_1]

Hi @vimahe35,

Thank you for getting in touch, we do appreciate your time.

I can confirm that this is a false-positive notice on PHP Compatibility Checker. The plugin does not directly make any SQL queries using underlying MySQL(i) libraries, but instead leverages the $wpdb global for all database queries.

That module will use the most fitting/compatible version of MySQL (class) to access your database and the content stored within. The reason this error is returned is because our system info class tests the MySQL version your site is running for support reasons. Our support staff may ask you to copy your system info and share it with us so that we can better replicate your environment.

For added transparency you can see the line being misinterpreted here:

$value = empty($wpdb->use_mysqli) ? mysql_get_server_info() : mysqli_get_server_info($wpdb->dbh);

In the line above we first use the $wpdb global to determine if you are using mysqli or mysql, and then return the information for the respective class/module.

The issue is that tools like PHP Compatibility Tester scan the file for known incompatible functions/modules and report based on the results found, without checking the context (conditions) in which the function is called.

In other words, on a site where mysqli is available, we will not call the deprecated module, however, tools that test compatibility, usually cannot test this condition accurately.

With that said, we do intend on removing the mysql counterpart to this, in the future, as it is no longer relevant (but was when the system info block was released).

I hope this helps clarify why the report is returning a reference to mysql, even though it would not be called.

Hello @dylanauty,

I have upgraded to PHP 7.4 and so far no issue was raised.

When I sent my email I was using PHP 7.2 with WordPress 6.2 and therefore I had some security warnings and recommendations for upgrading PHP to make sure next coming version of Woocommerce would run properly.

Thanks for your fast reply and support.

 

This site will teach you how to build a WordPress website for beginners. We will cover everything from installing WordPress to adding pages, posts, and images to your site. You will learn how to customize your site with themes and plugins, as well as how to market your site online.

Buy WordPress Transfer