MyBB Community Forums

Full Version: MySQL error: 1264
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi, btw, haven't been on here for quite a while - nearly a year I believe! (actually.. just checked.. You last visited: 08-27-2004, 05:04 PM :O It doesn't seem that long ago...)

Anyhow, I was looking around for a forum software and stumbled across this again after completely forgetting about it.

I've installed it locally, and all seems well, except however after I registerred a new user for general testing. When I go to post with this user, it returns:

mySQL error: 1264
Out of range value adjusted for column 'location1' at row 1
Query: UPDATE mybb_sessions SET nopermission='1', location1='', location2='' WHERE sid='9ac549e6b6e72d50e8265e7a097b59b7'

Any ideas? Running MySQL 5.0.19 and PHP 5.

If you need the url, I can give it out but would first have to set up port forwarding from my router, so I won't now...

EDIT: Link to board: http://84.9.87.236/forum
I registered, just to let you know.
Very strange problem. I don't know the solution and searching these forums turned up similar problems but no solution.
Try going to inc/class_sessions.php and replacing
$array[1] = "";
with
$array[1] = 0;
Yes it is really wierd - I could post with no problems using the original administrator account ("parish") but when trying to post with the test account I created ("testusertotestregistration") it gave the above error.

I amended the file stated above and everything appears to work now Big Grin

I'm beggining to think is was something to do with new user activation? Because I don't have a mail server set up here the users were inactive.. therefore that mightve caused the problem?

I don't know.. but that fix appears to work for now.

Cheers. Big Grin
That line of code happens when showthread.php is displayed (from $_SERVER['PHP_SELF']). It tries to get things like tid from the URL. But it sets location1 (which seems to be reserved for fids from forumdislay) to an empty string. An empty string isn't much use for a number column so it throws an error. Glad it's working.
This fdidn't work for me, I changed $array[1] = ""; to $array[1] = 0; in inc/class_session.php and I still get the same error message! It only does when I'm going to post a thread when not logged in.
There are one more you can try changing in class_sessions.php
try changing
$array[2] = "";
with
$array[2] = 0;
Nope still same error, any other ideas?