MyBB Community Forums

Full Version: IP Characters in DB are wonky
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
MYBB is storing ip addresses in the database as bizarre character strings such as:

bàg—
DCsJ
F{õ
K‰ºp

and others like them. This is happening in the sessions and user tables (and I assume anywhere else ip addresses are stored).  I only installed plugins listed here on the MYBB site, but I am certain this issue existed prior to the installation of the few plugins I use anyway.  I cannot be the only person experiencing this problem, but I have not been able to locate any support information through the "search forums" field at the top of the page.  I could just be using the wrong keywords and if that is the case, please accept my apology.  

If this issue already been asked and answered, will someone please point me to the thread?  If not, what do I do to fix this?

Thanks in advance!


Edited to add:
Could this be a database encoding issue?  

MySQL: version 5.6.25 
Database Encoding: UTF-8 Unicode (utf8)
This is the packed way IP addresses are stored in the database. As soon as an IP address is show in the user interface it is translated to a "readable" address.
Why is that a problem?

The functions that are used for handling ip addresses are:

my_inet_ntop: Converts a packed internet address to a human readable representation

my_inet_pton: Converts a human readable IP address to its packed in_addr representation
(2015-08-29, 06:13 PM)Ad Bakker Wrote: [ -> ]This is the packed way IP addresses are stored in the database. As soon as an IP address is show in the user interface it is translated to a "readable" address.
Why is that a problem?

The functions that are used for handling ip addresses are:

my_inet_ntop: Converts a packed internet address to a human readable representation

my_inet_pton: Converts a human readable IP address to its packed in_addr representation

I went into the Admin CP and viewed the IP addresses from the UI; sure enough, they are shown correctly.  Because I configured ip settings not to show throughout the site, I was not aware they were working normally and that MyBB just neatly 'packaged' them. I have had problems with wonky characters before due to encoding issues (not MyBB) and when I saw those strange looking strings, I thought it was DejaVu.  
Blush  


Yay!  I do not have to 'fix' anything.  Thank you so much for your response.  Kudos (+1) to you!
I'd give 2, but apparently I do not have that privilege.