| Author |
Message |
Unit1 Regular


Joined: Oct 26, 2004 Posts: 65 Location: Boston
|
Posted:
Sun Aug 27, 2006 8:34 pm |
|
PHP version 5.0.4
Fourms 2.021
I updated our forums with the new patch and when I try to update a members permission I get this error any thoughts on this ?
Could not obtain moderator status
DEBUG MODE
SQL 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 ') AND aa.group_id = ug.group_id AND aa.auth_mod = 1 GROUP BY ug.use' at line 3
SELECT ug.user_id, COUNT(auth_mod) AS is_auth_mod FROM nuke_bbauth_access aa, nuke_bbuser_group ug WHERE ug.user_id IN () AND aa.group_id = ug.group_id AND aa.auth_mod = 1 GROUP BY ug.user_id
Line : 533
File : admin_ug_auth.php |
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7236 Location: Arizona
|
Posted:
Sun Aug 27, 2006 11:26 pm |
|
What version had you upgraded from and had you applied each of the upgrade.php scripts in succession until you finally arrived at 2.0.21? |
|
|
|
 |
evaders99 Moderator

Joined: Apr 30, 2004 Posts: 2749
|
Posted:
Mon Aug 28, 2006 11:39 am |
|
May need this fixgroup script
|
|
|
|
 |
Unit1 Regular


Joined: Oct 26, 2004 Posts: 65 Location: Boston
|
Posted:
Mon Aug 28, 2006 1:36 pm |
|
montego just in case i did miss one of the updates I redid them from 18 to 21 and ran all of the update scripts but still the same error I am going to try what evaders99 said and I will get back to you both |
|
|
|
 |
Unit1 Regular


Joined: Oct 26, 2004 Posts: 65 Location: Boston
|
Posted:
Mon Aug 28, 2006 3:55 pm |
|
Ok I ran the fixgroup script evaders99 and all is well now Thank you both for your help with my problem and for all you do for every one  |
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7236 Location: Arizona
|
Posted:
Tue Aug 29, 2006 12:57 am |
|
Yeah, we're now working on a fix for RavenNuke. Thanks Evaders! |
|
|
|
 |
thejackal Regular


Joined: Jul 26, 2006 Posts: 52
|
Posted:
Sat Nov 11, 2006 8:57 am |
|
This one just sprung up and I cannot locate the file.
Anyone have it? |
|
|
|
 |
Unit1 Regular


Joined: Oct 26, 2004 Posts: 65 Location: Boston
|
Posted:
Sat Nov 11, 2006 9:27 pm |
|
| Code: | <?php
/*=======================================================================
Nuke-Evolution Basic: Enhanced PHP-Nuke Web Portal System
=======================================================================*/
/*****[CHANGES]**********************************************************
-=[Base]=-
Nuke Patched v3.1.0 06/26/2005
************************************************************************/
/*****[BEGIN]******************************************
[ Base: Nuke Patched v3.1.0 ]
******************************************************/
if (!defined('MODULE_FILE')) {
die ("You can't access this file directly...");
}
/*****[END]********************************************
[ Base: Nuke Patched v3.1.0 ]
******************************************************/
if ($popup != "1"){
$module_name = basename(dirname(__FILE__));
require("modules/".$module_name."/nukebb.php");
}
else
{
$phpbb_root_path = 'modules/Forums/';
}
define('IN_PHPBB', true);
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include('includes/functions_search.'.$phpEx);
// Start session management
$userdata = session_pagestart($user_ip, PAGE_SEARCH, $nukeuser);
init_userprefs($userdata);
// End session management
//***** check users and user groups ****//
$sql = "SELECT user_id, username
FROM " . USERS_TABLE ."
WHERE user_id > 0";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user list', '', __LINE__, __FILE__, $sql);
}
$liste ='';
while ( $row = $db->sql_fetchrow($result) )
{
$username = $row['username'];
$user_id = $row['user_id'];
$usergroup = '';
$sql1 = "SELECT ug.group_id
FROM " . USER_GROUP_TABLE ." ug, ". GROUPS_TABLE. " g
WHERE ug.user_id = $user_id
AND ug.group_id = g.group_id
AND g.group_single_user = 1
";
if ( ($result1 = $db->sql_query($sql1)) )
{
$row1 = $db->sql_fetchrow($result1);
$usergroup =( ( $row1['group_id'] != '' ) ? $row1['group_id'] : 'User has no user group'.$row1 );
}
if (!($row1['group_id'] != ''))
{
$sql2 = "SELECT MAX(group_id) AS total
FROM " . GROUPS_TABLE;
if ( !($result2 = $db->sql_query($sql2)) )
{
message_die(GENERAL_ERROR, 'Could not obtain next group_id information', '', __LINE__, __FILE__, $sq2l);
}
if ( !($row2 = $db->sql_fetchrow($result2)) )
{
message_die(GENERAL_ERROR, 'Could not obtain next group_id information', '', __LINE__, __FILE__, $sql2);
}
$group_id = $row2['total'] + 1;
$sql3 = "INSERT INTO " . GROUPS_TABLE . " (group_id, group_name, group_description, group_single_user, group_moderator)
VALUES ($group_id, '', 'Personal User', 1, 0)";
if ( !($result3 = $db->sql_query($sql3, BEGIN_TRANSACTION)) )
{
message_die(GENERAL_ERROR, 'Could not insert data into groups table', '', __LINE__, __FILE__, $sql3);
}
$sql4 = "INSERT INTO " . USER_GROUP_TABLE . " (user_id, group_id, user_pending)
VALUES ($user_id, $group_id, 0)";
if( !($result4 = $db->sql_query($sql4, END_TRANSACTION)) )
{
message_die(GENERAL_ERROR, 'Could not insert data into user_group table', '', __LINE__, __FILE__, $sql4);
}
$usergroup = $usergroup.', adding user group '.$group_id;
}
$liste .= ( ( $liste != '' ) ? '<br> ' : '' ) . $username.' <b>'.$usergroup.'</b>';
}
message_die(GENERAL_MESSAGE,'Users:<br>'.$liste);
?> |
Here you go put it in your Forums folder and call the script by useing
| Quote: | | http://www.yoursite/modules.php?name=Forums&file=fixgroup.php |
I hope it helps  |
|
|
|
 |
ccac Hangin' Around

Joined: May 23, 2006 Posts: 36
|
Posted:
Tue Nov 28, 2006 10:50 pm |
|
By running that script, does it fix the error? I dont see how it does it without editing the sql.
Thanks!  |
|
|
|
 |
Unit1 Regular


Joined: Oct 26, 2004 Posts: 65 Location: Boston
|
Posted:
Wed Nov 29, 2006 6:20 pm |
|
If you look at the script that is what it does it will edit the sql and yes it will fix it |
|
|
|
 |
nimis Hangin' Around

Joined: Dec 13, 2007 Posts: 37 Location: New York, Bklyn
|
Posted:
Mon Mar 10, 2008 7:44 am |
|
Regarding the subject on SQL Error : 1064 Ive run into the problem my self when I checked out the Group Permissions Control.
| Code: | Couldn't obtain user/group information
DEBUG MODE
SQL 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 'AND ug.group_id = g.group_id AND u.user_id = ug.user_id' at line 1
SELECT u.user_id, u.username, u.user_level, g.group_id, g.group_name, g.group_single_user, ug.user_pending FROM nuke_users u, nuke_bbgroups g, nuke_bbuser_group ug WHERE g.group_id = AND ug.group_id = g.group_id AND u.user_id = ug.user_id
Line : 702
File : admin_ug_auth.php |
I was running RavenNuke_v2.10.01 and upgraded to RavenNuke_v2.20.00.
PHP version 5.
Iam sure I didnt run all the upgrade i sequense when 2.20.00 was done.
I dont remember if I ran upgrade20-21.php or just upgrade21-22.php from the bbtonuke_upgrades inclosed in the package of 2.20.00 or just ran a upgrade22-23.php which I found in this site.
How can I find out which upgrade was run if the bbtonuke caused the problem.
Ive tested by deleting the Group I created and recreated a new one but still bet the same error.
Am I right to say that the script that Unit1 posted here will fix my problem.
After reading the script it seems that it will.
Should I recreat the users gropu before runing the script or just go with it.
Theres a lot I dont remember all of a sudden.. must have to do with the 50+ yrs.
THx
Nimis |
|
|
|
 |
evaders99 Moderator

Joined: Apr 30, 2004 Posts: 2749
|
Posted:
Mon Mar 10, 2008 12:40 pm |
|
upgrade20-21.php inserts a field into bbconfig
('search_min_chars', '3')
upgrade21-22.php does nothing
upgrade22.23.php does nothing
Running the fixgroup script should fix the "Couldn't obtain user/group information error" error |
|
|
|
 |
nimis Hangin' Around

Joined: Dec 13, 2007 Posts: 37 Location: New York, Bklyn
|
Posted:
Mon Mar 10, 2008 1:24 pm |
|
Ok.. so Ive only run upgrade20-21.php. , Ive checked the bbconfig and located line 96
| Code: | | INSERT INTO `nuke_bbconfig` VALUES ('search_min_chars', '3'); |
Would it be wise to now run upgrade21-22.php then upgrade22.23.php or just the script that Unit1 posted above..
Not sure about which is the correct order.. |
|
|
|
 |
evaders99 Moderator

Joined: Apr 30, 2004 Posts: 2749
|
Posted:
Mon Mar 10, 2008 1:40 pm |
|
Definitely run Fixgroup (Unit1's posted it)
And if you don't have that search_min_chars, go ahead and run upgrade20-21.php
And run upgrade22-23.php to make sure your version number ends up at 2.0.23 |
|
|
|
 |
nimis Hangin' Around

Joined: Dec 13, 2007 Posts: 37 Location: New York, Bklyn
|
Posted:
Mon Mar 10, 2008 1:50 pm |
|
evaders99.. Thanks will do..
Ps.. what a great forum this is Ds.
Just sent you a pm  |
|
|
|
 |
nimis Hangin' Around

Joined: Dec 13, 2007 Posts: 37 Location: New York, Bklyn
|
Posted:
Tue Mar 11, 2008 7:55 am |
|
Back again.
Ive run bbtonuke_upgrades; upgrade20-21.php , upgrade21-22.php and upgrade22-23.php. Current version in phpBB Admin shows , Powered by phpBB 2.0.23.
Placed fixgroup.php in /modules/Forums/ , I pointed the browser to
Browser returns to my site showing (what Module ?)
When checking the bbconfig.sql I see last line as
INSERT INTO `nuke_bbconfig` VALUES ('search_min_chars', '3');
Ive even tested pointing browser to
The browser then shows a white page with following;
"No input file specified."
Checked the "Group Permissions Control" for the group I have and the SQL Error : 1064 I mentioned above still shows.
Can anyone tip me on what Iam doing wrong. |
|
|
|
 |
evaders99 Moderator

Joined: Apr 30, 2004 Posts: 2749
|
Posted:
Tue Mar 11, 2008 3:08 pm |
|
Use modules.php ?name=Forums&file=fixgroup
(Spaces added to bypass this site's GoogleTap features) |
|
|
|
 |
nimis Hangin' Around

Joined: Dec 13, 2007 Posts: 37 Location: New York, Bklyn
|
Posted:
Tue Mar 11, 2008 7:06 pm |
|
Iam
and still doesn't work with ?name=Forums&file=fixgroup.php
Receive in browser...
404
Get Not Found
The requested URL /modules.php was not found on this server. |
|
|
|
 |
evaders99 Moderator

Joined: Apr 30, 2004 Posts: 2749
|
Posted:
Tue Mar 11, 2008 7:17 pm |
|
*Cough*
| evaders99 wrote: | Use modules.php ?name=Forums&file=fixgroup
|
Remove the space too |
|
|
|
 |
ciph3r Worker


Joined: Jun 01, 2005 Posts: 176
|
Posted:
Fri Mar 28, 2008 10:53 pm |
|
Wow, 2 years later. . . . Just tried to add a user to a specific forum and encountered this error.
Searched on Rnukes site, found, and ran the solution.
Amazing.
All is working well. . . Thanks again guys. |
|
|
|
 |
montego Site Admin

Joined: Aug 29, 2004 Posts: 7236 Location: Arizona
|
Posted:
Sat Mar 29, 2008 7:14 am |
|
That is just one of the values of:
Help us stay on-line...  |
|
|
|
 |
|
|
|
|