MantisBT - v1.2 Release (Closed)
View Issue Details
0000291v1.2 Release (Closed)[All Projects] Generalpublic2009-10-19 01:332009-12-08 19:08
Reporteravallee 
Assigned Tocaseydk 
PrioritynormalSeverityblockReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version 
Target VersionFixed in Version1.2 
Summary0000291: SQL error in editing permission
DescriptionI have change the permission to a user A giving a permission to edit another user's (B) permissions
After that change, I can view the permission of user A - SQL error below.
Additional Informationhere the SQL error message:
ERROR: /home/pollenlpd/www/web2project/classes/query.class.php(1145) : query failed(SELECT FROM ((`users` AS users)) WHERE = '33') - error was: 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 'FROM ((`users` AS users)) WHERE = '33'' at line 1
Backtrace:
0 /home/pollenlpd/www/web2project/classes/query.class.php:1145 dprint('/home/pollenlpd/www/web2project/classes/query.class.php',1145,0,'query failed(SELECT FROM ((`users` AS users)) WHERE = \'33\') - error was: 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 \'FROM ((`users` AS users)) WHERE = \'33\'\' at line 1')
1 /home/pollenlpd/www/web2project/classes/query.class.php:1384 exec(1)
2 /home/pollenlpd/www/web2project/modules/system/acls_view.php:67 loadResult()
3 /home/pollenlpd/www/web2project/index.php:371 require('/home/pollenlpd/www/web2project/modules/system/acls_view.php')

ERROR: /home/pollenlpd/www/web2project/classes/query.class.php(1145) : query failed(SELECT FROM ((`users` AS users)) WHERE = '33') - error was: 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 'FROM ((`users` AS users)) WHERE = '33'' at line 1
Backtrace:
0 /home/pollenlpd/www/web2project/classes/query.class.php:1145 dprint('/home/pollenlpd/www/web2project/classes/query.class.php',1145,0,'query failed(SELECT FROM ((`users` AS users)) WHERE = \'33\') - error was: 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 \'FROM ((`users` AS users)) WHERE = \'33\'\' at line 1')
1 /home/pollenlpd/www/web2project/classes/query.class.php:1384 exec(1)
2 /home/pollenlpd/www/web2project/modules/system/acls_view.php:67 loadResult()
3 /home/pollenlpd/www/web2project/index.php:371 require('/home/pollenlpd/www/web2project/modules/system/acls_view.php')

ERROR: /home/pollenlpd/www/web2project/classes/query.class.php(1145) : query failed(SELECT FROM ((`users` AS users)) WHERE = '33') - error was: 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 'FROM ((`users` AS users)) WHERE = '33'' at line 1
Backtrace:
0 /home/pollenlpd/www/web2project/classes/query.class.php:1145 dprint('/home/pollenlpd/www/web2project/classes/query.class.php',1145,0,'query failed(SELECT FROM ((`users` AS users)) WHERE = \'33\') - error was: 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 \'FROM ((`users` AS users)) WHERE = \'33\'\' at line 1')
1 /home/pollenlpd/www/web2project/classes/query.class.php:1384 exec(1)
2 /home/pollenlpd/www/web2project/modules/system/acls_view.php:67 loadResult()
3 /home/pollenlpd/www/web2project/index.php:371 require('/home/pollenlpd/www/web2project/modules/system/acls_view.php')

ERROR: /home/pollenlpd/www/web2project/classes/query.class.php(1145) : query failed(SELECT FROM ((`users` AS users)) WHERE = '33') - error was: 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 'FROM ((`users` AS users)) WHERE = '33'' at line 1
Backtrace:
0 /home/pollenlpd/www/web2project/classes/query.class.php:1145 dprint('/home/pollenlpd/www/web2project/classes/query.class.php',1145,0,'query failed(SELECT FROM ((`users` AS users)) WHERE = \'33\') - error was: 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 \'FROM ((`users` AS users)) WHERE = \'33\'\' at line 1')
1 /home/pollenlpd/www/web2project/classes/query.class.php:1384 exec(1)
2 /home/pollenlpd/www/web2project/modules/system/acls_view.php:67 loadResult()
3 /home/pollenlpd/www/web2project/index.php:371 require('/home/pollenlpd/www/web2project/modules/system/acls_view.php')
TagsNo tags attached.
Attached Files

Notes
(0000554)
caseydk   
2009-10-19 10:08   
Ouch, that's no good.

Can you tell me what version of web2project you're using? Are you definitely on the latest (v1.1) release?
(0000556)
avallee   
2009-10-21 01:55   
yes, 1.1 release.
Here is the detailed system environment:
web2Project 1.1.0
PHP version nr: 5.2.5-pl1-gentoo
DB provider and version nr: mysql 5.0.44 (5.0.44-log)
DB Table Prefix: ""
Web Server: Apache/2.0.59 (Unix) mod_ssl/2.0.59 OpenSSL/0.9.8g
Server Protocol | Gateway Interface: HTTP/1.1 | CGI/1.1
Client Browser: Mozilla/5.0 (Windows; U; Windows NT 5.0; fr; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3
URL Query: m=help
File Version Id: index.php 500 2009-07-09 04:37:42Z caseydk $ $URL: https://web2project.svn.sourceforge.net/svnroot/web2project/trunk/modules/help/index.php
Server Time | Timezone: Wed, 21 Oct 2009 13:57:35 | CEST
PHP Max. Execution Time: 30 seconds
Memory Limit: 64 Mb
(0000558)
avallee   
2009-10-22 07:44   
the worse is that I can't go back and change the permission for that user ...
Need to change the permission of its role.
(0000568)
caseydk   
2009-11-08 21:11   
Try running this sql statement:

UPDATE `modules` SET `permissions_item_table` = 'users', `permissions_item_field` = 'user_id', `permissions_item_label` = 'user_username' WHERE `mod_directory` = 'admin';


If that works, please let me know and I'll write the formal fix.
(0000569)
caseydk   
2009-11-08 21:11   
(as noted)

Issue History
2009-10-19 01:33avalleeNew Issue
2009-10-19 10:07caseydkProjectv1.1 Release (Closed) => v1.2 Release (Closed)
2009-10-19 10:08caseydkNote Added: 0000554
2009-10-19 10:08caseydkStatusnew => feedback
2009-10-19 10:15caseydkSeveritymajor => block
2009-10-21 01:55avalleeNote Added: 0000556
2009-10-22 07:44avalleeNote Added: 0000558
2009-11-08 21:10caseydkStatusfeedback => assigned
2009-11-08 21:10caseydkAssigned To => caseydk
2009-11-08 21:11caseydkNote Added: 0000568
2009-11-08 21:11caseydkStatusassigned => resolved
2009-11-08 21:11caseydkResolutionopen => fixed
2009-11-08 21:11caseydkNote Added: 0000569
2009-12-08 19:08caseydkStatusresolved => closed
2009-12-08 19:08caseydkFixed in Version => 1.2