Welcome to Geeklog, Anonymous Saturday, December 21 2024 @ 01:07 pm EST

Geeklog Forums

registration error


IW

Anonymous
Hello there,

i have a huge problem... When a user want's to register, he can't do it. There is that error: "An SQL error has occured. Please see error.log for details."

And here you go, the error log:

"

Thu Apr 14 04:10:11 2005 - 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 ' 5)' at line 1. SQL in question: INSERT INTO gl_group_assignments (ug_main_grp_id,ug_uid) VALUES (, 5)

Fri Apr 15 04:42:15 2005 - 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 ' 6)' at line 1. SQL in question: INSERT INTO gl_group_assignments (ug_main_grp_id,ug_uid) VALUES (, 6)

Thu Apr 28 02:23:58 2005 - 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 ' 7)' at line 1. SQL in question: INSERT INTO gl_group_assignments (ug_main_grp_id,ug_uid) VALUES (, 7)

Fri Apr 29 03:17:38 2005 - 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 ' 8)' at line 1. SQL in question: INSERT INTO gl_group_assignments (ug_main_grp_id,ug_uid) VALUES (, 8)

"

Any ideas how to fix it? I tried and replaced users.php, usersettings.php and admin/user.php from my other wellworking system. So, what's the problem? I really need to be able to register new users. Thanks 4 help
 Quote

Status: offline

knuff

Forum User
Full Member
Registered: 12/17/04
Posts: 340
Location:Sweden
hmmm, your ug_main_grp_id is missing.

this is strange as it is normally automatically created by lib-users.php

Text Formatted Code
// Add user to Logged-in group (i.e. members) and the All Users group
    $normal_grp = DB_getItem ($_TABLES['groups'], 'grp_id',
                              "grp_name='Logged-in Users'");
    $all_grp = DB_getItem ($_TABLES['groups'], 'grp_id',
                           "grp_name='All Users'");
    DB_query ("INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id,ug_uid) VALUES ($normal_grp, $uid)");
    DB_query ("INSERT INTO {$_TABLES['group_assignments']} (ug_main_grp_id,ug_uid) VALUES ($all_grp, $uid)");

 


Did you changed some of the groups or deleted them directly from the database ?

GL will normally add every user to the "all users" group and the logged in users upon registration.

If these groups do not exist any longer, the value would be blank and result in such an error.

If you didn´t do anything of the above, you should check under admin > groups that at least following two groups exist:

'Logged-in Users' and 'All Users'

Best Regards,
Boris
Vanrillaer.com - our Family Portal
 Quote

IW

Anonymous
In fact i have changed group names via phpmyadmin. Because i wanted them to be displayed trough portal in our language (whole system should be slovenian, not even one english or some other language word. So what to do now? I have another GL database, and that one GL is working well. Should i delete the groups table and import a new one from working GL?

Any way, thank you so much for your kindness, i now some HTML, tiny piece of PHP, bubt SQL is a mistery, at the moment. Well, i am 19, and that's it. I'll have to learn a lot more. And Boris, where are you from? Sounds slovan, like russia or something.

Regards,
Vid
 Quote

IW

Anonymous
grp_id grp_name grp_descr grp_gl_core
1 sistemski operater popolne pravice spleta 1
2 vsi uporabniki skupina za (nove) uporabnike 1
3 Uredništvo ima poln dostop za urejanje èlankov 1
4 skrbnik blokov upravlja z bloki IW portala 1
5 skrbnik povezav upravlja povezave portala 1
6 skrbnik rubrik upravlja z rubrikami portala 1
7 skrbnik dogodkov upravlja dogodke portala 1
8 skrbnik anket upravlja ankete portala 1
9 nadzornik uporabnikov upravlja uporabnike 1
10 skrbnik modulov operira z moduli portala 1
11 skrbnik skupin upravlja s skupinami uporabnikov 1
12 skrbnik e-pošte upravlja e-mail orodja 1
13 prijavljeni uporabniki vsi registrirani uporabniki 1
14 skrbnik fiksnih strani upravlja fiksne strani 0
15 skrbnik SpamX upravlja SpamX modul 0

 Quote

IW

Anonymous
Does grp_name reflects in errors if i change it? It's only a name (varchar(50) )... Should i rename it?
 Quote

IW

Anonymous
WORKS!!!

Thanks, o tought it was the database, but i couldn't figgure it out that' was the group names problem... I was browsing on user and user_group_assignments, but now it works fine. I only replaced name and description for grp_id's 2 and 13 in gl_groups table.

But here is a problem again... - i do not wont to show any foreign words in our system, we are translating everything (: the source code remains as it is Smile what average user can see. But does the user can see the groups and their description, so as Admin can? Thanks anyway, registration works.
 Quote

Status: offline

knuff

Forum User
Full Member
Registered: 12/17/04
Posts: 340
Location:Sweden
Since the groups are called on the registration proces, the easiest would be to change the lib-user.php and adapt the query so it get´s the good group.

Text Formatted Code

    $normal_grp = DB_getItem ($_TABLES['groups'], 'grp_id',
                              "grp_name='Logged-in Users'");
    $all_grp = DB_getItem ($_TABLES['groups'], 'grp_id',
                           "grp_name='All Users'");
 


But if you really want to make every single bit in a different language especially in the non-public (read admin) part, you better start learning some basic php as you will still have to change "quite" a lot, specially if you start using plugins and you might run in some errors like this that are not that common.

Also if you follow that path, and really can´t stand some left-overs of english, remember upgrading to a newer release will be more difficult ...

But then again ... it´s surely a challenge.

And I am originally from Belgium, but living in Sweden (at least in the weekend) ... Mr. Green
Vanrillaer.com - our Family Portal
 Quote

Status: offline

Dirk

Site Admin
Admin
Registered: 01/12/02
Posts: 13073
Location:Stuttgart, Germany
Quote by IW: but now it works fine. I only replaced name and description for grp_id's 2 and 13 in gl_groups table.

Geeklog identifies groups by name, so you should change them all back. There's a reason why you can't edit them from Geeklog ...

bye, Dirk
 Quote

All times are EST. The time is now 01:07 pm.

  • 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