MyBB Community Forums

Full Version: [B] longipaddress
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
with MyBB 1.4.4 and MySQL 5:

in the posts table there is a field longipaddress int(11). PHP ip2long() returns numbers bigger than this field can hold, so you can end up with negative values for longip in the database. Is this intended behaviour?
http://php.net/ip2long

That is how it works.
I'm on a 64bit system, so it never returned negative values for me. Only found out in the comments on that ip2long page that PHP behaves differently for ip2long on 64bit.
We already have that fixed for a future version iirc