Welcome to Geeklog, Anonymous Sunday, December 22 2024 @ 12:55 am EST

Geeklog Forums

Anonymous SQL error


Status: offline

spiffin

Forum User
Newbie
Registered: 12/03/03
Posts: 5
Hello and congratulations on GL 1.3.8 .. it really is excellent.

I've setup a couple of GL sites and both are working well.

However a strange error is occurring on one of them. I wanted to make it a 'closed' site (members only) so I've disabled anonymous read permissions on blocks except the User Functions block (which allows them to apply for membership).

Whenever an anonymous user clicks any of my menus they should see "Login required .. etc" which works for all the menus BUT, for some reason, if an anonymous user clicks on "Contribute" they see:

"An SQL error has occured. Please see error.log for details."

My error log says:

"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. SQL in question: SELECT username FROM gl_users WHERE uid ="

I'm using MySQL version 4.0.15 (standard).

Could anyone please let me know how to rectify this and have it just give the standard "Login required" notice?

Thank you,

spiffin
 Quote

Status: offline

spiffin

Forum User
Newbie
Registered: 12/03/03
Posts: 5
Hi all

I managed to find my own solution, so here it is in case anyone else has a similar problem:

I had wanted to have the author of any story also able to edit it, so I tweaked the group permissions via phpMyAdmin (more specifically I inserted a row into the gl_access table giving the story.edit feature (ft-id 1) to the group All Users (grp_id 2). This resulted in the SQL error 1064 when an anonymous user clicked the Contribute link.

However, after much testing and tweaking, I found that if I removed the story.edit feature from All Users and instead gave it to Logged-In Users (grp_id 13) it both got rid of the SQL error AND gave authors edit permissions.

Hope this is useful to someone else.

spiffin
 Quote

All times are EST. The time is now 12:55 am.

  • Normal Topic
  • Sticky Topic
  • Locked Topic
  • New Post
  • Sticky Topic W/ New Post
  • Locked Topic W/ New Post
  •  View Anonymous Posts
  •  Able to post
  •  Filtered HTML Allowed
  •  Censored Content