Pierre-Lannoy / wp-ip-locator

Country and language IP-based detection for WordPress.
https://perfops.one/
GNU General Public License v3.0
6 stars 2 forks source link

mydomain.INET6_ATON does not exist #1

Closed mmokrejs closed 2 years ago

mmokrejs commented 2 years ago

Hi Pierre, I just installed the plugin v3.5.1 and created a file logger instance using DecaLog https://wordpress.org/plugins/decalog/ . One of the entries shows the SQL table is either missing a column or a function is not defined. I am not sure how to interpret it.

AJAX.CRITICAL: A database error was detected during the page rendering: “FUNCTION mydomain.INET6_ATON does not exist“ in the query “SELECT `country` FROM `wp_iplocator_v4` WHERE `from` ≤ INET6_ATON(`195.201.152.254`) AND `to` ≥ INET6_ATON(`195.201.152.254`) ;“. {"class":"db","component":"MySQL compatible","version":"5.5" ...

Environment (please complete the following information):

Pierre-Lannoy commented 2 years ago

Hello @mmokrejs ! This is due to the fact that INET6_ATON function is available from MySQL 5.6 (and not before). Your version is too old to support IP Locator and, btw, doesn't meets WordPress requirements. Sorry.

mmokrejs commented 2 years ago

Thank you, @Pierre-Lannoy , but could is it really critical error? Anyway, I wouldn't have IPv6 enabled. So could IP Locator work even without this support in mysql? And could it report in the WP menu whether requisite criteria are met?

Pierre-Lannoy commented 2 years ago

I know the name of this function is a bit confusing, but it processes IPv4 and IPv6 adresses. So IP Locator is fully unusable.

I'm really sorry for that. I know it's a little harsh to hear, but I stick to WP requirements, and never test these requirements are covered… I consider every WP admin meets these requirements when installing WP and don't take security / perf risks with outdated versions.

Hope it helps you to understand the situation.

mmokrejs commented 2 years ago

Well, today admin of the container did the upgrade of mysql so it should be no problem for me but nevertheless it could report the unmet specs to the WP admin. It is uncommon someone like me installed WP-syslogging tool and grepped for error in the zillions of lines. Well, it was my 2c. Thank you anyway for your quick answers.