Log in

View Full Version : confusing MySQL Error number 1054


memobug
12-09-2004, 09:40 PM
Hi There,

We've changed servers a week or so ago. I have seen this error emailed to me twice:

Database error in vBulletin 3.0.3:
Invalid SQL:
UPDATE user
SET posts = posts + Array
WHERE userid = 0

mysql error: Unknown column 'Array' in 'field list'
mysql error number: 1054
Date: Thursday 09th of December 2004 05:00:03 PM
Script: http://
Referer:
Username: Unregistered
IP Address:
Can anyone tell me what this means? I see the scriptname is mostly blank. does that mean it is a mod like photopost or something nonVB generating the error? Does the fact that the username shows as unregistered mean anything?

Hmmm. Maybe it is that port of Ryangel's journal? It never gave this error before, but it seems to be some unnamed script somewhere.

It's confusing

memobug
01-06-2005, 07:23 AM
Any help please? I have been getting this error and the corresponding email about four times a day and I would love to get rid of it. Even a suggestion at what I might do to help debug it would be helpful.

I have these hacks installed:

vbjournal
photopost_classifieds
photopost_gallery
vbadvanced_CMPS

Many thanks,

Matt

rake
01-06-2005, 08:14 AM
You gotta give more details. WHEN do you get the error? In what script?

memobug
01-06-2005, 09:38 AM
The error is emailed to me by the server. I never actually "get it". It happens usually twice a day, sometimes 4x. That's the actual email message that I included in the first post. The error is always the same. The script is not identified, which makes me think it is probably a non-VB error. I think it is probably some Photopost thing.

Regards,

Matt

deathemperor
01-06-2005, 11:49 AM
Database error in vBulletin 3.0.3:
Invalid SQL:
UPDATE user
SET posts = posts + Array
WHERE userid = 0

mysql error: Unknown column 'Array' in 'field list'
mysql error number: 1054
Date: Thursday 09th of December 2004 05:00:03 PM
Script: http://
Referer:
Username: Unregistered
IP Address:
that's the incorrect thingy.

You should search for those hack this string: "user
SET posts = posts +" , the value 'Array' should be a number but it doesn't set properly.

I don't understand why the error appears on no file !?!

memobug
01-06-2005, 07:24 PM
Hi deathemperor,

I don't know what you mean by "incorrect," but it does look bizarre, which makes me think it is not a vb script, but a hack or something that does not set $THISSCRIPT or whatever to make the Script field appear.

Photopost does increment /decrement user post count when they add or delete a comment. They deny it is their thing becuase they don't email errors.

[UPDATE] I am going to look at journals.php now.
Nope, journals doesn't increment or decrement "posts" on entry or comment

Regards,

Matt

rake
01-07-2005, 05:19 PM
There's a program called editplus2 which has a very handy "search in files" function. You could use that to track down the script that's creating the problems.

deathemperor
01-08-2005, 05:24 AM
Hi deathemperor,

I don't know what you mean by "incorrect," but it does look bizarre, which makes me think it is not a vb script, but a hack or something that does not set $THISSCRIPT or whatever to make the Script field appear.

Photopost does increment /decrement user post count when they add or delete a comment. They deny it is their thing becuase they don't email errors.

The incorrect thing I mentioned was for the yellow 'Array' in my quote. it showed up 'Array' probally because that varible is an array like but instead of calling it like $array['value'] they just added $array.

However I'm not sure about this, it's just one possible chance.

memobug
01-08-2005, 05:10 PM
I think it is the articlebot hack. I found that the errors might coincide with the cron, and there is this in articlebot.php

if (is_array($users))
{
foreach ($users as $userid => $user_posts)
{
/* +---------------------------------+
| Query: update article bot(s) |
+---------------------------------+ */


$DB_site->query("
UPDATE ".TABLE_PREFIX."user
SET posts = posts + $user_posts
WHERE userid = $userid
");
}
}


Thanks for the help. I will follow up in the articlebot thread.

Regards,

Matt