PDA

View Full Version : database problem since uploading hacks...


amity
06-27-2002, 02:11 AM
hey all,
in the last few days i have put up the birthday bit, users online today hacks. now, when i do something with the admin panel and try to help users change their e mail or password i get this error:


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

mysql error number: 1064

Date: Wednesday 26th of June 2002 10:58:30 PM
Script: http://www.amitymama.com/vb/vb/admin/user.php
Referer: http://www.amitymama.com/vb/admin/user.php?action=edit&userid=1

any ideas? i am just not sure what this is... both hacks are up and running fine, but i am not sure if i changed something?

thanks for your help in advance!!
am

FWC
06-27-2002, 05:43 AM
See if you have this:// ###################### Start edit #######################
if ($action=="edit") {

$user=$DB_site->query_first("SELECT *,FROM_UNIXTIME(joindate) AS If you do, replace it with this:// ###################### Start edit #######################
if ($action=="edit") {

$user=$DB_site->query_first("SELECT user.*,FROM_UNIXTIME(joindate) AS This happened to somebody else I know when they installed a hack with the old version of the query.

Logician
06-27-2002, 05:51 AM
and contact your host if they upgraded to new PHP version. If yes, you need to upgrade your board to 2.2.6 (or apply the fix). More info at vb.com's announcement board..

amity
06-27-2002, 03:27 PM
i have about 6 or 7 of them running right now, and i can't imagine having to do them all over again. i haven't upgraded since 2.2.4 out of sheer fear. :rolleyes: i have 2100+ registered and at least 550 of those visit daily. i would hate to screw the boards up.

any tips or thoughts for me?

thanks guys!
amity

Xenon
06-27-2002, 03:30 PM
as logician said, seems to be the php42x bug.

you'll have to go to vbulletin.com and download the bugfix or upgrade to vb226

Logician
06-27-2002, 04:02 PM
Originally posted by amity
i have about 6 or 7 of them running right now, and i can't imagine having to do them all over again. i haven't upgraded since 2.2.4 out of sheer fear. :rolleyes: i have 2100+ registered and at least 550 of those visit daily. i would hate to screw the boards up.

You have only 7 hacks and afraid to upgrade? come on now :)

Here is a general tip: Always have a (or a few) mirror of your site in your local computer. Nakkid has a instruction regarding the issue in Hints board. Install PHP, MYSQL and Apache to your computer and copy all directory tree of your site to your computer together with MYSQL database.

Now you can test everything there and make sure it will be ok. This applies to installing new hacks, trying code changes, upgrading, reapplying hacks, anything you can think of. If you dont encounter any problems, you can do it in your real board..

By the way you may like to give a shot for the fix, but it may not work (it didnt work here).

amity
07-17-2002, 03:40 AM
hey guys,
i tried the script change, that didn't work. i also applied the bug fix, and that didn't work either. any thoughts on what this is? i am considering uploading a new user.php file. what do you think?

thanks!!
amity

Logician
07-17-2002, 05:51 PM
Originally posted by amity
hey guys,
i tried the script change, that didn't work. i also applied the bug fix, and that didn't work either. any thoughts on what this is? i am considering uploading a new user.php file. what do you think?

I wouldnt it suggest such a practise amity. Using vb scripts with different versions together can cause you much more headaches and IMO your board may become very unstable. Besides it would probably not solve your problem and if it related to PHP issue as we guessed, other vb scripts can cause other weird errors too..

I STRONGLY suggest upgrading your board and reapply your hacks. They are only 7, how much time can it take?