[CWB] Undeletable users

Hardie, Andrew a.hardie at lancaster.ac.uk
Fri May 6 10:47:13 CEST 2022


What seems to be the problem here is that (1) certain saved queries belonging to the user are marked as categorised queries (b) but the actual categorisation data is absent (lost track of at some point in upgrade history I assume) (c) so attempts to delete the catquery will fail (d) so attempts to delete the user fail.

I'll fix this in both 3.3. and 3.2 in the next commits.

Andrew.

-----Original Message-----
From: cwb-bounces at sslmit.unibo.it <cwb-bounces at sslmit.unibo.it> On Behalf Of Jörg Knappen
Sent: 06 May 2022 09:12
To: cwb at sslmit.unibo.it
Subject: [CWB] Undeletable users


I cleaned up the users on our cqpweb server (an installation with quite a history now) an there were a few users that I couldn't delete.

The users in question were real power users in the past, using some features (e.g., saved catqueries) that other users typically don't use.

I append the error message (with personal data anonymised) below. I'm afraid that with respect to the users in question the server might be in a slightly inconsistent state right now.

Jörg Knappen

CQPweb encountered an error and could not continue.

An SQL query did not run successfully!

Original query: drop table if exists /* from User: Admin | Function:
delete_user() | 2022-May-06 10:02 */

Error # 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 2 PHP debugging backtrace

array(7) {
   [1]=>
   array(4) {
     ["file"]=>
     string(42) "/var/www/html/cqpweb/lib/exiterror-lib.php"
     ["line"]=>
     int(367)
     ["function"]=>
     string(9) "exiterror"
     ["args"]=>
     array(3) {
       [0]=>
       array(3) {
         [0]=>
         string(38) "An SQL query did not run successfully!"
         [1]=>
         string(114) "Original query:

drop table if exists
         /* from User: Admin | Function: delete_user() | 2022-May-06
10:02 */

"
         [2]=>
         string(161) "Error # 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 2 "
       }
       [1]=>
       NULL
       [2]=>
       NULL
     }
   }
   [2]=>
   array(4) {
     ["file"]=>
     string(36) "/var/www/html/cqpweb/lib/sql-lib.php"
     ["line"]=>
     int(216)
     ["function"]=>
     string(18) "exiterror_sqlquery"
     ["args"]=>
     array(3) {
       [0]=>
       int(1064)
       [1]=>
       string(146) "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 2"
       [2]=>
       string(94) "drop table if exists
         /* from User: Admin | Function: delete_user() | 2022-May-06
10:02 */"
     }
   }
   [3]=>
   array(4) {
     ["file"]=>
     string(41) "/var/www/html/cqpweb/lib/useracct-lib.php"
     ["line"]=>
     int(278)
     ["function"]=>
     string(12) "do_sql_query"
     ["args"]=>
     array(1) {
       [0]=>
       string(94) "drop table if exists
         /* from User: Admin | Function: delete_user() | 2022-May-06
10:02 */"
     }
   }
   [4]=>
   array(4) {
     ["file"]=>
     string(36) "/var/www/html/cqpweb/lib/execute.php"
     ["line"]=>
     int(196)
     ["function"]=>
     string(11) "delete_user"
     ["args"]=>
     array(1) {
       [0]=>
       string(6) "abcdef"
     }
   }
   [5]=>
   array(4) {
     ["file"]=>
     string(42) "/var/www/html/cqpweb/lib/admin-execute.php"
     ["line"]=>
     int(181)
     ["args"]=>
     array(1) {
       [0]=>
       string(36) "/var/www/html/cqpweb/lib/execute.php"
     }
     ["function"]=>
     string(7) "require"
   }
   [7]=>
   array(4) {
     ["file"]=>
     string(34) "/var/www/html/cqpweb/adm/index.php"
     ["line"]=>
     int(1)
     ["args"]=>
     array(1) {
       [0]=>
       string(38) "/var/www/html/cqpweb/lib/adminhome.php"
     }
     ["function"]=>
     string(7) "require"
   }
}

CQPweb v3.2.42 © 2008-2020      Help! on CQPweb         You are logged
in as user [Admin]

_______________________________________________
CWB mailing list
CWB at sslmit.unibo.it
https://eur02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fliste.sslmit.unibo.it%2Fmailman%2Flistinfo%2Fcwb&amp;data=05%7C01%7Chardiea%40live.lancs.ac.uk%7C31379b60e6ab48a41e7108da2f3a0037%7C9c9bcd11977a4e9ca9a0bc734090164a%7C0%7C0%7C637874223823356903%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=3MXIbmNqeDaBONq%2F1%2FtAfNb3uuC5tF0Zfy17iQ34btM%3D&amp;reserved=0


More information about the CWB mailing list