PDA

View Full Version : User Id Database error Help


irn-bru
08-02-2002, 06:49 AM
I need some help I am haveing a db error when updateing profiles in the admin cp.

I think it may be a hack I installed.
Please have a look and tell me how to sort it.

Thanx

I have attached the admin/user.php also

----------------------------------------------------------------


Database error in vBulletin Control Panel 2.2.5:

Invalid SQL: SELECT userid
FROM user
WHERE username='andy o'
AND userid <>
mysql error: You have an error in your SQL syntax near '' at line 4

mysql error number: 1064

Date: Friday 02nd of August 2002 03:41:17 AM
Script: http://www.m-a-j-e-s-t-i-c.com/admin/user.php
Referer: http://www.m-a-j-e-s-t-i-c.com/admin/user.php?s=eda&action=edit&userid=172

------------------------------------------------------------

--------user table in database----------

DROP TABLE IF EXISTS user;
CREATE TABLE user (
userid int(10) unsigned NOT NULL auto_increment,
usergroupid smallint(5) unsigned NOT NULL default '0',
username varchar(50) NOT NULL default '',
password varchar(50) NOT NULL default '',
email varchar(50) NOT NULL default '',
styleid smallint(5) unsigned NOT NULL default '0',
parentemail varchar(50) NOT NULL default '',
coppauser smallint(6) NOT NULL default '0',
homepage varchar(100) NOT NULL default '',
icq varchar(20) NOT NULL default '',
aim varchar(20) NOT NULL default '',
yahoo varchar(20) NOT NULL default '',
signature mediumtext NOT NULL,
adminemail smallint(6) NOT NULL default '0',
showemail smallint(6) NOT NULL default '0',
invisible smallint(6) NOT NULL default '0',
usertitle varchar(250) NOT NULL default '',
customtitle smallint(6) NOT NULL default '0',
joindate int(10) unsigned NOT NULL default '0',
cookieuser smallint(6) NOT NULL default '0',
daysprune smallint(6) NOT NULL default '0',
lastvisit int(10) unsigned NOT NULL default '0',
lastactivity int(10) unsigned NOT NULL default '0',
lastpost int(10) unsigned NOT NULL default '0',
posts smallint(5) unsigned NOT NULL default '0',
timezoneoffset varchar(4) NOT NULL default '',
emailnotification smallint(6) NOT NULL default '0',
buddylist mediumtext NOT NULL,
ignorelist mediumtext NOT NULL,
pmfolders mediumtext NOT NULL,
receivepm smallint(6) NOT NULL default '0',
emailonpm smallint(6) NOT NULL default '0',
pmpopup smallint(6) NOT NULL default '0',
avatarid smallint(6) NOT NULL default '0',
options smallint(6) NOT NULL default '15',
birthday date NOT NULL default '0000-00-00',
maxposts smallint(6) NOT NULL default '-1',
startofweek smallint(6) NOT NULL default '1',
ipaddress varchar(20) NOT NULL default '',
referrerid int(10) unsigned NOT NULL default '0',
nosessionhash smallint(6) NOT NULL default '0',
inforum smallint(5) unsigned NOT NULL default '0',
picture_name varchar(50) NOT NULL default '',
photodesc varchar(255) NOT NULL default '',
pictime varchar(30) NOT NULL default '',
updatetime varchar(30) NOT NULL default '',
messagepopup tinyint(2) NOT NULL default '0',
downloads text NOT NULL,
forumviewset varchar(250) NOT NULL default ':',
mood varchar(25) NOT NULL default '',
reason varchar(25) NOT NULL default '',
drate varchar(10) NOT NULL default '',
off varchar(25) NOT NULL default '',
time varchar(18) NOT NULL default '',
today varchar(18) NOT NULL default '',
comments varchar(250) NOT NULL default '',
award tinytext NOT NULL,
quotes smallint(5) default '0',
PRIMARY KEY (userid),
KEY usergroupid (usergroupid),
KEY username (username),
KEY inforum (inforum),
KEY referrerid (referrerid),
KEY userid (userid),
KEY userid_2 (userid),
FULLTEXT KEY username_2 (username)
) TYPE=MyISAM;

-----------------------------------------------------------------

Admin
08-02-2002, 07:38 AM
You may not post full files from vBulletin.

Upgrade to version 2.2.6 to fix this bug.

irn-bru
08-02-2002, 11:36 AM
Well I am not upgradeing to 2.2.6 just yet
as I have to many hacks and dont want to redo
all them considering vbulletin 3.0 will be out soon
I am sure.

I didn't know about the rules I have seen many
members on this board posting vbulletin php files.

If you had a look FireFly can you tell me ware
the error is.. Is it a php file errror of a database
error?

Admin
08-02-2002, 11:40 AM
It's a bug in vBulletin, caused by an error in the PHP file. If you're not willing to upgrade you will have to put up with the error.

irn-bru
08-02-2002, 12:02 PM
Right ok I see its not cause of a hack, its a bug
its strange why It worked ok before I was hacking
about ?

Thanx for the info Firefly I will have to do the
upgrade.

Admin
08-02-2002, 12:06 PM
The bug is caused by the way PHP 4.2.x handles MySQL result sets, versus how it used to work. Your host must've upgraded to 4.2.2 (smart move, security fix), so you are now getting the error.

Dakota
08-05-2002, 04:07 PM
I am getting the same error, and I am using 2.2.6

Steve Machol
08-05-2002, 04:23 PM
Reupload the original user.php file from 2.2.6. Make sure you upload in ASCII *and* overwrite the file on the server.

irn-bru
08-05-2002, 05:39 PM
aye did do that m8 rather than upgradeing.

I just used the user.php from 2.2.6 and
deleted the 2.2.5

Its working ok... for now anyway.

Will be doing the full 2.2.6 when I got some
spare time thanx for the help guys.