View Issue Details

IDProjectCategoryView StatusLast Update
0015248phpList 3 applicationAdmin Managementpublic02-06-10 13:32
Reporterscottg Assigned To 
Status resolvedResolutionfixed 
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.



22-03-09 23:05

reporter   ~0050578

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:


23-03-09 14:53

administrator   ~0050582

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);


24-03-09 10:28

reporter   ~0050598

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

fixed the error message (no more error message).


02-06-10 02:45

manager   ~0051032

It seems to me this was fixed in 2.10.10. Can you confirm this?


02-06-10 13:32

administrator   ~0051033

yes, that was fixed