FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » FUDforum Development » Bug Reports » users are unable to register with the forum, SQL error, fresh install
Show: Today's Messages :: Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
users are unable to register with the forum, SQL error, fresh install [message #9031] Sat, 08 March 2003 15:39 Go to next message
bbarnett is currently offline  bbarnett   Canada
Messages: 19
Registered: March 2003
Karma: 0
Junior Member
I've installed FUDforum (the .8 version, just downloaded it today) several times, and no matter what users are unable to register with the forum.

Actually, the first user can always register, but the second user and beyond seem to have the problem. The user can initially register (and see the forum), but the confirmation email causes an SQL error.

Once this SQL error has occured (that is, once the user has visited the confirmation url), the user can no longer log in or do anything.

The log from the admin panel is:

Time Error Description
Sat Mar 8 15:32:40 GMT 2003 (rid=&S=c6395b2380133e52337a4768d1f26ed3) 1064: You have an error in your SQL syntax near ') AND cat_id!=0' at line 1
Query: SELECT MAX(last_post_id) FROM fud23_forum WHERE id IN() AND cat_id!=0
Server Version: 3.23.49-log
Sat Mar 8 15:37:43 GMT 2003 (rid=&S=c407a9c887408d0844c2e37650c4c4b6) 1064: You have an error in your SQL syntax near ') AND cat_id!=0' at line 1
Query: SELECT MAX(last_post_id) FROM fud23_forum WHERE id IN() AND cat_id!=0
Server Version: 3.23.49-log
Sat Mar 8 15:38:11 GMT 2003 (t=index&rid=4&S=c407a9c887408d0844c2e37650c4c4b6) 1064: You have an error in your SQL syntax near ') AND cat_id!=0' at line 1
Query: SELECT MAX(last_post_id) FROM fud23_forum WHERE id IN() AND cat_id!=0
Server Version: 3.23.49-log
[Referring Page] http://www.l8r.net/fud/FUDforum2/index.php?t=subscribed&rid=4&S=c40 7a9c887408d0844c2e37650c4c4b6
Sat Mar 8 15:38:19 GMT 2003 () 1064: You have an error in your SQL syntax near ') AND cat_id!=0' at line 1
Query: SELECT MAX(last_post_id) FROM fud23_forum WHERE id IN() AND cat_id!=0
Server Version: 3.23.49-log
Sat Mar 8 15:40:49 GMT 2003 () 1064: You have an error in your SQL syntax near ') AND cat_id!=0' at line 1
Query: SELECT MAX(last_post_id) FROM fud23_forum WHERE id IN() AND cat_id!=0
Server Version: 3.23.49-log

[Updated on: Sat, 08 March 2003 15:40]

Report message to a moderator

Re: users are unable to register with the forum, SQL error, fresh install [message #9058 is a reply to message #9031] Mon, 10 March 2003 23:28 Go to previous messageGo to next message
bbarnett is currently offline  bbarnett   Canada
Messages: 19
Registered: March 2003
Karma: 0
Junior Member


Does anyone have any idea?!
Re: users are unable to register with the forum, SQL error, fresh install [message #9062 is a reply to message #9058] Tue, 11 March 2003 08:33 Go to previous messageGo to next message
bbarnett is currently offline  bbarnett   Canada
Messages: 19
Registered: March 2003
Karma: 0
Junior Member


Well, I've discovered the issue.

Install FUD forum .8 release. Set up your forums so that none are readable by any registered user. Add a new user. This line:

$lmid=q_singleval("SELECT MAX(last_post_id) FROM fud23_forum WHERE ".($GLOBALS['usr']->is_mod != 'A' ? " id IN(".get_all_perms(_uid).") AND " : '')." cat_id!=0");

gives the error, because get_all_perms(_uid) returns nothing, if the user has no read ability on any forum.

Commenting out the line fixes things for now.

This is something that I'm sure a few people use. I have a closed board, with 10 different forums. Each forum is viewable by new, registered users.. but no forum is readable or postable until that user is added to a group.

Any ideas on a good fix? Quick fix was:

$lmid=q_singleval("SELECT MAX(last_post_id) FROM fud23_forum WHERE ".($GLOBALS['usr']->is_mod != 'A' ? " id IN(".get_all_perms(_uid).") AND " : '')." cat_id!=0");


Changed to :



$boogerface = get_all_perms(_uid);
if ($boogerface) {
$lmid=q_singleval("SELECT MAX(last_post_id) FROM fud23_forum WHERE ".($GLOBALS['usr']->is_mod != 'A' ? " id IN($boogerface) AND " : '')." cat_id!=0");
}
Re: users are unable to register with the forum, SQL error, fresh install [message #9064 is a reply to message #9031] Tue, 11 March 2003 15:23 Go to previous messageGo to next message
bbarnett is currently offline  bbarnett   Canada
Messages: 19
Registered: March 2003
Karma: 0
Junior Member
Should I be reporting this bug somewhere else? I just want to make sure my observations and possible changes are noticed by the coders.

From what I've seen, they may not look at this forum. Does anyone know where else to post this?
Re: users are unable to register with the forum, SQL error, fresh install [message #9132 is a reply to message #9064] Thu, 13 March 2003 15:32 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Fixed, thank you for the detailed report.

FUDforum Core Developer
Re: users are unable to register with the forum, SQL error, fresh install [message #21709 is a reply to message #9031] Sun, 12 December 2004 03:51 Go to previous messageGo to next message
warath is currently offline  warath   Canada
Messages: 2
Registered: December 2004
Location: Canada
Karma: 0
Junior Member
I am still getting this error, however on a create category:

(/xxx/FUDforum/include/theme/default/db.inc:123
/xxx/FUDforum/include/theme/default/db.inc:185
/xxx/FUDforum/include/cat.inc:34
/xxx/FUDforum/adm/admcat.php:35
) 1064: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
Query: SELECT MAX(view_order) FROM fud_cat WHERE parent=
_POST: S=b41b950ed526f03ec1073f5a77ab287f&SQ=5252f272575869045d69e4d10f7aafdf& amp;cat_name=General&cat_description=&cat_default_view=2&cat_pa rent=&cat_pos=LAST&cat_submit=Add Category&cat_cat_opt=3&
Server Version: 4.1.7-standard-log

Re: users are unable to register with the forum, SQL error, fresh install [message #21712 is a reply to message #21709] Sun, 12 December 2004 15:05 Go to previous messageGo to next message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
What version of the forum are you using?

FUDforum Core Developer
Re: users are unable to register with the forum, SQL error, fresh install [message #21718 is a reply to message #21712] Sun, 12 December 2004 19:59 Go to previous messageGo to next message
warath is currently offline  warath   Canada
Messages: 2
Registered: December 2004
Location: Canada
Karma: 0
Junior Member
The newest 2.6.8, and I found the issue; for some reason the Parent Category was blank, after deleteing the default category and an attempt to create a new. Once I made sure it was selected to "Top Level" everything worked great.
Re: users are unable to register with the forum, SQL error, fresh install [message #21737 is a reply to message #21718] Mon, 13 December 2004 18:01 Go to previous message
Ilia is currently offline  Ilia   Canada
Messages: 13241
Registered: January 2002
Karma: 0
Senior Member
Administrator
Core Developer
Fixed in CVS.

FUDforum Core Developer
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: how to download newsgroups for first time
Next Topic: error on cat.inc
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Sat Sep 28 21:57:47 GMT 2024

Total time taken to generate the page: 0.02628 seconds