MyBB Community Forums

Full Version: Value out of range for longreip/longlastip column
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Mybb tries to insert values into longregip and longlastip which are too big. The columns are both ints, and my ip being '2180086322' is of course out of range for a signed int. The exact message I got at install time was:
22003 - ERROR: value "2180086322" is out of range for type integer

.. and this persists every time I load a page with a nice sql error at the bottom for longlastip. It was easily fixed by changing the columns to bigint, though setting it unsigned might be enough, I don't know.

The bug occurs on a vanilla install of mybb 1.4.4 with PostgreSQL 8.1.11 and PHP 5.2.9; absolutely no mods of any kind.
Please create separate topics for each bug report.

As for the longregip/longlastip, are you on a 64 bit machine?
(2009-03-20, 09:20 PM)Ryan Gordon Wrote: [ -> ]Please create separate topics for each bug report.
Fixed.
Quote:As for the longregip/longlastip, are you on a 64 bit machine?
Yes, I suppose I should've said. Centos 5.2 x86_64.
(2009-03-20, 09:34 PM)peroo Wrote: [ -> ]
(2009-03-20, 09:20 PM)Ryan Gordon Wrote: [ -> ]Please create separate topics for each bug report.
Fixed.
Quote:As for the longregip/longlastip, are you on a 64 bit machine?
Yes, I suppose I should've said. Centos 5.2 x86_64.

Then, do you have the 64bit MySQL installed? With a 64 bit machine, PHP will generate 64 bit integers and MySQL should be able to handle it the same. It doesn't look like you have 64 bit MySQL installed.
(2009-03-20, 09:48 PM)Ryan Gordon Wrote: [ -> ]
(2009-03-20, 09:34 PM)peroo Wrote: [ -> ]
(2009-03-20, 09:20 PM)Ryan Gordon Wrote: [ -> ]Please create separate topics for each bug report.
Fixed.
Quote:As for the longregip/longlastip, are you on a 64 bit machine?
Yes, I suppose I should've said. Centos 5.2 x86_64.

Then, do you have the 64bit MySQL installed? With a 64 bit machine, PHP will generate 64 bit integers and MySQL should be able to handle it the same. It doesn't look like you have 64 bit MySQL installed.
I'm running PostgreSQL, and yes I'm running a 64bit version. Ints in pgsql seem to be 32bit no matter what.
(2009-03-20, 10:22 PM)peroo Wrote: [ -> ]
(2009-03-20, 09:48 PM)Ryan Gordon Wrote: [ -> ]
(2009-03-20, 09:34 PM)peroo Wrote: [ -> ]
(2009-03-20, 09:20 PM)Ryan Gordon Wrote: [ -> ]Please create separate topics for each bug report.
Fixed.
Quote:As for the longregip/longlastip, are you on a 64 bit machine?
Yes, I suppose I should've said. Centos 5.2 x86_64.

Then, do you have the 64bit MySQL installed? With a 64 bit machine, PHP will generate 64 bit integers and MySQL should be able to handle it the same. It doesn't look like you have 64 bit MySQL installed.
I'm running PostgreSQL, and yes I'm running a 64bit version. Ints in pgsql seem to be 32bit no matter what.

I would consider that a bug of PostgreSQL then. Naturally default integer specs should flow with the technological limitation, not a hard coded limitation.
Nah, I believe MySQL uses the same size fields regardless of whether it's compiled as 32-bit or 64-bit.
I'd say it's more of a PHP issue since it should act largely the same regardless of the underlying platform...
SQL can store these values with no problem but the table definition does not allow it to. The ip only has 32bits anyway (except that on 32bit php this value has to be signed because PHP only has signed ints), so even if another database only stores 32bit ints it's fine as long as they can be unsigned ints... all you have to do is change the table definition accordingly.
My new server uses a 2coreduo on 64 bit, I also use the CentOS 64, latest MySQL and PHP versions. I also have a IP that's 10 digets. I'm not having this issue. I also have a lot of users that use COX for an ISP like myself and they have 10 diget IP's. No one has ever reported this issue and I haven't seen it myself. I don't know if this helps, but I thought I'd add my input since I have an actual dedicated hosting server running these specs. And personally, I LOVE the 64 bit. Good luck.

EDIT: I went from a shared 32 bit 4 months ago or so to the 64 and had no issues with MyBB as of yet.
^ You won't see any errors, just in the back-end, some IPs may be stored incorrectly (and you'll never notice unless you actually try searching for them Toungue).
Pages: 1 2