Whose responsibility is it to deal with ipv6 addresses? Plugin author or host?
-
I just finally nailed some sporadic bugs with two WordPress plugins I use which happen to store users ip addresses.
The problem in both cases is that the developer setup a varchar(25) length database column to store ip addresses in and occasionally an ip address comes through in big long ipv6 format. So when a database insert happens that includes the ip address as part of the data being inserted, the insert just silently fails.
Both plugin authors told me that I should configure my web host setup so that $_SERVER[REMOTE_ADDR] always return an ipv4 ip address and never an ipv6.
But my web host says that any code written that can only accommodate ipv4 ip addresses is severely out of date.
Here are example of the two kinds of ip addresses if you’re not familiar.
Example IPv4 address: 104.16.0.1
Example IPv6 address: 2400:cb00:f00d:dead:beef:1111:2222:3333What’s your take on this? I’m just curious.
- The topic ‘Whose responsibility is it to deal with ipv6 addresses? Plugin author or host?’ is closed to new replies.