IP count and IPv6
-
Hello,
I’m using IPv4 & IPv6 at home, and I’ve noticed that when accessing my wordpress site with your plugin, it does not work in IPv6.
The PHP logs says :
WordPress database error Column ‘ip’ cannot be null for query INSERT INTO wp_cpd_counter (page, ip, client, date, country, referer)
VALUES (‘107’, INET_ATON(‘2a02:8424:2955:8a00:203:47ff:fee3:58db’), ‘Mozilla/5.0 (Macintosh; Intel Mac OS X 10_6_8) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2’, ‘2012-11-21’, ”, ”) made by require, wp, WP->main, do_action_ref_array, call_user_func_array, CountPerDay->count, CountPerDayCore->mysqlQueryI’ve disabled IPv6 at home, and it works.
Can you adapt the query depending on the IP format ?
maybe this can help :http://labs.watchmouse.com/2009/10/extending-mysql-5-with-ipv6-functions/
Thanks in advance
Doff
The topic ‘IP count and IPv6’ is closed to new replies.