Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> BBtoNuke
Author Message
Unit1
Worker
Worker



Joined: Oct 26, 2004
Posts: 134
Location: Boston

PostPosted: Sun Aug 27, 2006 8:34 pm Reply with quote

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
 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Sun Aug 27, 2006 11:26 pm Reply with quote

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?

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Mon Aug 28, 2006 11:39 am Reply with quote

May need this fixgroup script [ Only registered users can see links on this board! Get registered or login! ]

_________________
- Star Wars Rebellion Network -

Need help? Nuke Patched Core, Coding Services, Webmaster Services 
View user's profile Send private message Visit poster's website
Unit1







PostPosted: Mon Aug 28, 2006 1:36 pm Reply with quote

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







PostPosted: Mon Aug 28, 2006 3:55 pm Reply with quote

Ok I ran the fixgroup script evaders99 and all is well now RavensScripts Thank you both for your help with my problem and for all you do for every one worship
 
montego







PostPosted: Tue Aug 29, 2006 12:57 am Reply with quote

Yeah, we're now working on a fix for RavenNuke. Thanks Evaders!
 
thejackal
Regular
Regular



Joined: Jul 26, 2006
Posts: 52

PostPosted: Sat Nov 11, 2006 8:57 am Reply with quote

This one just sprung up and I cannot locate the file.

Anyone have it?
 
View user's profile Send private message
Unit1







PostPosted: Sat Nov 11, 2006 9:27 pm Reply with quote

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 Very Happy
 
ccac
Hangin' Around



Joined: May 23, 2006
Posts: 40

PostPosted: Tue Nov 28, 2006 10:50 pm Reply with quote

By running that script, does it fix the error? I dont see how it does it without editing the sql.

Thanks! Smile
 
View user's profile Send private message
Unit1







PostPosted: Wed Nov 29, 2006 6:20 pm Reply with quote

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

PostPosted: Mon Mar 10, 2008 7:44 am Reply with quote

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

_________________
˜”°º••º°”˜ Live and Learn˜”°º••º°”˜ 
View user's profile Send private message
evaders99







PostPosted: Mon Mar 10, 2008 12:40 pm Reply with quote

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







PostPosted: Mon Mar 10, 2008 1:24 pm Reply with quote

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







PostPosted: Mon Mar 10, 2008 1:40 pm Reply with quote

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







PostPosted: Mon Mar 10, 2008 1:50 pm Reply with quote

evaders99.. Thanks will do..

Ps.. what a great forum this is Ds. Very Happy

Just sent you a pm Sad
 
nimis







PostPosted: Tue Mar 11, 2008 7:55 am Reply with quote

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
[ Only registered users can see links on this board! Get registered or login! ]

Browser returns to my site showing (what Module ?)

Image

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
[ Only registered users can see links on this board! Get registered or login! ]

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







PostPosted: Tue Mar 11, 2008 3:08 pm Reply with quote

Use modules.php ?name=Forums&file=fixgroup
(Spaces added to bypass this site's GoogleTap features)
 
nimis







PostPosted: Tue Mar 11, 2008 7:06 pm Reply with quote

Iam Bang Head Bang Head Bang Head
and still doesn't work with [ Only registered users can see links on this board! Get registered or login! ] ?name=Forums&file=fixgroup.php

Receive in browser...
404
Get Not Found
The requested URL /modules.php was not found on this server.
 
evaders99







PostPosted: Tue Mar 11, 2008 7:17 pm Reply with quote

*Cough*

evaders99 wrote:
Use modules.php ?name=Forums&file=fixgroup

Remove the space too
 
ciph3r
Worker
Worker



Joined: Jun 01, 2005
Posts: 178

PostPosted: Fri Mar 28, 2008 10:53 pm Reply with quote

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.
 
View user's profile Send private message Visit poster's website
montego







PostPosted: Sat Mar 29, 2008 7:14 am Reply with quote

That is just one of the values of:

RavensScripts

Help us stay on-line... Wink
 
bugsTHoR
Involved
Involved



Joined: Apr 05, 2006
Posts: 263

PostPosted: Mon Dec 15, 2008 11:08 am Reply with quote

worked for me too xD
thanks guys

Image

_________________
LUV RAVEN DISTROBUTION BEBE

Clanthemes.com are great (free advertisements for now until i get to 20,000 posts LoL) 
View user's profile Send private message
rrclansite
Regular
Regular



Joined: Jan 18, 2011
Posts: 86

PostPosted: Thu Dec 23, 2010 6:07 pm Reply with quote

is there any chance i can still get this script?
because im having the same error but the download link isn't active anymore

heres my error:


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.user_' 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 : 561
File : admin_ug_auth.php

hope this helps anything Smile

best regards and thanks in advance
 
View user's profile Send private message
Palbin
Site Admin



Joined: Mar 30, 2006
Posts: 2583
Location: Pittsburgh, Pennsylvania

PostPosted: Thu Dec 23, 2010 10:53 pm Reply with quote

The script can be located in the latest download under UtilityFiles/DBFixes

_________________
"Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it." — Brian W. Kernighan. 
View user's profile Send private message
Palbin







PostPosted: Thu Dec 23, 2010 10:56 pm Reply with quote

[ Only registered users can see links on this board! Get registered or login! ]
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> BBtoNuke

View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©