NOTE:: Before reporting an issue, make sure you are running the latest version, currently 3.3.1

View Issue Details Jump to Notes ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0015248phplist applicationUser Managementpublic22-03-09 12:2002-06-10 13:32
PlatformOSOS Version
Product Version2.10.9 
Target Version2.10.10Fixed in Version2.10.10 
Summary0015248: DB error 1146 while doing query Table 'groups' doesn't exist
DescriptionRecently installed PHPList 2.10.9 and all seemed to work fine until I enabled user passwords in config.php by changing ASKFORPASSWORD,0 to ASKFORPASSWORD,1. Now, after the user enters their password, they get the error message:

Database error 1146 while doing query Table '*_phplist.groups' doesn't exist

I would manually create the table but I don't know what variables and parameters of the table should be.

I don't know where that "groups" table comes from. I see that there are others with the error referencing "user_group" but not "groups".

I don't think I have any custom mods installed. I did a typical installation and modified some of the variables in config.php as instructed in the documentation.

I ran dbcheck and all was good (checked). The table "groups" was not listed there, not part of dbcheck.
Additional InformationLinux
PHP 5.2.8
MySQL 5.0.67
TagsNo tags attached.
Attached Files

- Relationships Relation Graph ] Dependency Graph ]

-  Notes
CS2 (reporter)
22-03-09 23:05

If you set "ASKFORPASSWORD" to 1, then on line 170 of lists/index.php it calls the loadUser function, which is defined in admin/lib/commonlib/userlib.php.

Line 761 of that file calls the userGroups() function like this:
  $_SESSION["usergroups"] = userGroups($loginname);

The userGroups() function is defined starting on line 393 of the same file. On line 400, it calls the getEveryoneGroupId() function (also defined in the same file), which in turn queries the groups table.

No where in this sequence of events does the code check to see if the "groups" table exists, as it does in other places.

My best guess is that line 400 should be changed from:
  $ev = getEveryoneGroupID();
if (Sql_Table_exists("groups"))
  $ev = getEveryoneGroupID();

There may be other places where the check was not made, but I believe its the cause in this case.

Please see also this related forum topic: [^]
michiel (manager)
23-03-09 14:53

the "groups" table in the DB is part of the Webbler (cms that phplist is a module of) and should be ignored when using phpList standalone.

it's safe to remove that line

$_SESSION["usergroups"] = userGroups($loginname);

scottg (reporter)
24-03-09 10:28

In userlib.php, changing line 400
  $ev = getEveryoneGroupID();
  if (Sql_Table_exists("groups"))
  $ev = getEveryoneGroupID();

fixed the error message (no more error message).
h2b2 (manager)
02-06-10 02:45

It seems to me this was fixed in 2.10.10. Can you confirm this?
michiel (manager)
02-06-10 13:32

yes, that was fixed

Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker