PHP Web Host - Quality Web Hosting For All PHP Applications Clan Themes! We make clans look good!!
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.
Author Message
NuclearX
New Member
New Member


Joined: May 21, 2004
Posts: 21

PostPosted: Thu Jun 03, 2004 5:42 pm Reply with quote Back to top

Ok, I started out with PHP-Nuke 7.0, and gained about 24 members to my website (this was a fresh install). I had some problems with forum permissions, so I ran the "FixIt.php" script:
Code:
<?php
//*****  check users and user groups ****//

if (!eregi("modules.php", $_SERVER['PHP_SELF'])) {
    die ("You can't access this file directly...");
}
$module_name = basename(dirname(__FILE__));
require("modules/Forums/nukebb.php");

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

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

?>


That completely fixed the problem. Then, I decided to upgrade to the Raven PHP-Nuke 7.0. I created a complete backup file of the old PHP-Nuke, and then manually ran all the database queries to re-populate the website's members and posts, etc, for the new version.

It all runs fine, untill I try to make a new member a moderator of a forum. This member joins after I installed the new version, but I cannot make him a moderator (I can still make the old members moderators and stuff). I get the error:
Code:

Couldn't update private forum permissions

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 ' 1)' at line 2

INSERT INTO nuke_bbauth_access (forum_id, group_id, auth_mod) VALUES (25, , 1)

Line : 425
File : /home/nuclearx/public_html/modules/Forums/admin/admin_ug_auth.php


Soooo, I tried to re-run the "FixIt.php" script, but it does not work. I get this error:
Code:

Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator,
Only registered users can see links on this board!
Get registered or login to the forums!
and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.


Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.


I changed the file permissions to 777, and that ^^ is the error I get.

Would anyone (please?) know how to fix this, so I could either re-run the "FixIt.php" script (perhaps by erasing what the "FixIt.php" script did, and redoing it), or simply find another way to fix it. Thanks! Very Happy
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Thu Jun 03, 2004 7:41 pm Reply with quote Back to top

My 7.0 distro uses phpbb v2.0.6. What version is your database that you are loading from?
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
NuclearX
New Member
New Member


Joined: May 21, 2004
Posts: 21

PostPosted: Thu Jun 03, 2004 8:48 pm Reply with quote Back to top

It was 2.0.8 (I had upgraded it). Do you think if I upgraded your version to 2.0.8 it might work? *goes to try*
View user's profile Send private message
Raven
Site Admin/Owner


Joined: Aug 27, 2002
Posts: 16987
Location: Kansas

PostPosted: Thu Jun 03, 2004 11:18 pm Reply with quote Back to top

That would be my guess.
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger
NuclearX
New Member
New Member


Joined: May 21, 2004
Posts: 21

PostPosted: Tue Jun 08, 2004 9:46 pm Reply with quote Back to top

Worked, so far. Thanks!
View user's profile Send private message
Display posts from previous:       
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.

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
Forums ©
 

All logos and trademarks in this site are property of their respective owner.
The comments are property of their posters, all the rest © 2002-2011 by Raven

You can syndicate our news using the file xml

CSE HTML Validator Helped Clean up This Page! [Valid RSS] valid RSS 2.0 Valid robots.txt Stop Spam Harvesters, Join Project Honey Pot

Website engines core code is © copyright by PHP-Nuke but has been heavily patched and modified by myself and others.
PHP-Nuke is a free software released under the GNU/GPL.


:: fisubice phpbb2 style by Daz :: PHP-Nuke theme by www.nukemods.com ::
:: fisubice Theme Modified by the RavenNuke™ Team ::

:: W3C CSS Compliance Validation :: W3C HTML 4.01 Transitional Compliance Validation ::

zerosum