BBtoNuke 209 update problem

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   BBtoNuke 209 update problem
dobbelina
CZ Super Newbie
dobbelina has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 10, 2004
0.01 posts per day
Posts: 58
Points: 3,836
   
Hi !
I have phpnuke v7.3 installed with forumversion 2.08.
After replacing all the update files in "BBtoNuke209" and
running the "update_to_209.php" i can no longer
access the admin panel at the phpbb forum ?
I get the "You are not authorised to administer this board" message ?
I have no problem to log in as admin in phpnuke, only the forum admin ?
For fun i tried to only replace the files without running the update script
but can't still login.
Only when i use the v2.08 files will it work.
Please help me,i really want this update.
Thanks if you reply.
Dobbelina icon_biggrin.gif



Back to top Reply with quote
#2   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
Is that the one from this site? I know chatserv ported a version too and his is full of bugs is that the version you got?




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   
JRSweets
CZ Active Member
 Codezwiz Site Donator
JRSweets has been a member for over 20 year's 20 Year Member
usa.gif massachusetts.gif
Age: 43
Gender: Male
Fav. Sports Team: NE Patriots
Website:
Status: Offline
Joined: Apr 07, 2004
0.03 posts per day
Posts: 259
Points: 19,861
  MSN Messenger 
I believe you have to log in as a user and admin at the same time. Try logging in the site, then log into the admin section of phpnuke. Once you log in to both you should be all set.



Back to top Reply with quote
#4   
chatserv
CZ Newbie
chatserv has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 16, 2004
0.00 posts per day
Posts: 2
Points: 192
   


Originally posted by Telli @ Fri Jul 16, 2004 3:27 am:

Is that the one from this site? I know chatserv ported a version too and his is full of bugs is that the version you got?

Full of bugs? you must be kidding me, i fix bugs, i don't make them, it would seem you don't know who i am, as for the so called bugs i find odd that you mentioned on another site that my files matched yours identically: [ Register or login to view links on this board. ]
I guess that means your port is full of bugs as well since the files match identically which they don't.

Now for the admin login issue, why were people getting that with my port and not with yours? simple, you did not include on the common.php file the code that was causing the problem, easy way out but that leaves the forums wide open for the attacks the phpBB group intended to block, the code in question is to NOT be removed, it has caused problems for many but that is because of code that relies on register_globals being on, the code unsets global variables and by doing so it kills the admin and user globals along with the name global used by modules to pass their name, these issues have been corrected. For more info on the code: [ Register or login to view links on this board. ]

For reference here's your common.php file:
<?php
/***************************************************************************
*                                common.php
*                            -------------------
*   begin                : Saturday, Feb 23, 2001
*   copyright            : (C) 2001 The phpBB Group
*   email                : [ Register or login to view links on this board. ]
*
*   $Id: common.php,v 1.74.2.10 2003/06/04 17:41:39 acydburn Exp $
*
*
***************************************************************************/
/***************************************************************************
* phpbb2 forums port version 2.0.5 (c) 2003 - Nuke Cops (http://nukecops.com)
*
* Ported by Nuke Cops to phpbb2 standalone 2.0.5 Test
* and debugging completed by the Elite Nukers and site members.
*
* You run this package at your sole risk. Nuke Cops and affiliates cannot
* be held liable if anything goes wrong. You are advised to test this
* package on a development system. Backup everything before implementing
* in a production environment. If something goes wrong, you can always
* backout and restore your backups.
*
* Installing and running this also means you agree to the terms of the AUP
* found at Nuke Cops.
*
* This is version 2.0.5 of the phpbb2 forum port for PHP-Nuke. Work is based
* on Tom Nitzschner's forum port version 2.0.6. Tom's 2.0.6 port was based
* on the phpbb2 standalone version 2.0.3. Our version 2.0.5 from Nuke Cops is
* now reflecting phpbb2 standalone 2.0.5 that fixes some bugs and the
* invalid_session error message.
***************************************************************************/
/***************************************************************************
*   This file is part of the phpBB2 port to Nuke 6.0 (c) copyright 2002
*   by Tom Nitzschner (tom@toms-home.com)
*   http://bbtonuke.sourceforge.net (or http://www.toms-home.com)
*
*   As always, make a backup before messing with anything. All code
*   release by me is considered sample code only. It may be fully
*   functual, but you use it at your own risk, if you break it,
*   you get to fix it too. No waranty is given or implied.
*
*   Please post all questions/request about this port on http://bbtonuke.sourceforge.net first,
*   then on my site. All original header code and copyright messages will be maintained
*   to give credit where credit is due. If you modify this, the only requirement is
*   that you also maintain all original copyright messages. All my work is released
*   under the GNU GENERAL PUBLIC LICENSE. Please see the README for more information.
*
***************************************************************************/
/***************************************************************************
*
*   This program is free software; you can redistribute it and/or modify
*   it under the terms of the GNU General Public License as published by
*   the Free Software Foundation; either version 2 of the License, or
*   (at your option) any later version.
*
***************************************************************************/

if ( !defined('IN_PHPBB') )
{
        die("Hacking attempt");
}

error_reporting  (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables
set_magic_quotes_runtime(0); // Disable magic_quotes_runtime

//
// addslashes to vars if magic_quotes_gpc is off
// this is a security precaution to prevent someone
// trying to break out of a SQL statement.
//
if( !get_magic_quotes_gpc() )
{
        if( is_array($HTTP_GET_VARS) )
        {
                while( list($k, $v) = each($HTTP_GET_VARS) )
                {
                        if( is_array($HTTP_GET_VARS[$k]) )
                        {
                                while( list($k2, $v2) = each($HTTP_GET_VARS[$k]) )
                                {
                                        $HTTP_GET_VARS[$k][$k2] = addslashes($v2);
                                }
                                @reset($HTTP_GET_VARS[$k]);
                        }
                        else
                        {
                                $HTTP_GET_VARS[$k] = addslashes($v);
                        }
                }
                @reset($HTTP_GET_VARS);
        }

        if( is_array($HTTP_POST_VARS) )
        {
                while( list($k, $v) = each($HTTP_POST_VARS) )
                {
                        if( is_array($HTTP_POST_VARS[$k]) )
                        {
                                while( list($k2, $v2) = each($HTTP_POST_VARS[$k]) )
                                {
                                        $HTTP_POST_VARS[$k][$k2] = addslashes($v2);
                                }
                                @reset($HTTP_POST_VARS[$k]);
                        }
                        else
                        {
                                $HTTP_POST_VARS[$k] = addslashes($v);
                        }
                }
                @reset($HTTP_POST_VARS);
        }

        if( is_array($HTTP_COOKIE_VARS) )
        {
                while( list($k, $v) = each($HTTP_COOKIE_VARS) )
                {
                        if( is_array($HTTP_COOKIE_VARS[$k]) )
                        {
                                while( list($k2, $v2) = each($HTTP_COOKIE_VARS[$k]) )
                                {
                                        $HTTP_COOKIE_VARS[$k][$k2] = addslashes($v2);
                                }
                                @reset($HTTP_COOKIE_VARS[$k]);
                        }
                        else
                        {
                                $HTTP_COOKIE_VARS[$k] = addslashes($v);
                        }
                }
                @reset($HTTP_COOKIE_VARS);
        }
}

//
// Define some basic configuration arrays this also prevents
// malicious rewriting of language and otherarray values via
// URI params
//
$board_config = array();
$userdata = array();
$theme = array();
$images = array();
$lang = array();
$nav_links = array();
$gen_simple_header = FALSE;

include($phpbb_root_path . 'config.'.$phpEx);

if( !defined("PHPBB_INSTALLED") )
{
        header("Location: modules.php?name=Forums&file=install");
        exit;
}

global $forum_admin;
if ($forum_admin == 1) {
    //include("../../../db/db.php");
    include("../../../includes/constants.php");
    include("../../../includes/template.php");
    include("../../../includes/sessions.php");
    include("../../../includes/auth.php");
    include("../../../includes/functions.php");
} else {
    include("includes/constants.php");
    include("includes/template.php");
    include("includes/sessions.php");
    include("includes/auth.php");
    include("includes/functions.php");
    include("db/db.php");
}

//
// Obtain and encode users IP
//
// I'm removing HTTP_X_FORWARDED_FOR ... this may well cause other problems such as
// private range IP's appearing instead of the guilty routable IP, tough, don't
// even bother complaining ... go scream and shout at the idiots out there who feel
// "clever" is doing harm rather than good ... karma is a great thing ... :)
//
$client_ip = ( !empty($HTTP_SERVER_VARS['REMOTE_ADDR']) ) ? $HTTP_SERVER_VARS['REMOTE_ADDR'] : ( ( !empty($HTTP_ENV_VARS['REMOTE_ADDR']) ) ? $HTTP_ENV_VARS['REMOTE_ADDR'] : $REMOTE_ADDR );

$user_ip = encode_ip($client_ip);

//
// Setup forum wide options, if this fails
// then we output a CRITICAL_ERROR since
// basic forum information is not available
//
$sql = "SELECT *
        FROM " . CONFIG_TABLE;
if( !($result = $db->sql_query($sql)) )
{
        message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
}

while ( $row = $db->sql_fetchrow($result) )
{
        $board_config[$row['config_name']] = $row['config_value'];
}


//
// Show 'Board is disabled' message if needed.
//
if( $board_config['board_disable'] && !defined("IN_ADMIN") && !defined("IN_LOGIN") )
{
        message_die(GENERAL_MESSAGE, 'Board_disable', 'Information');
}

?>


Can you point out the exact location of the function unset_vars(&$var) and the code that follows it in that file? I can't seem to find it.


Back to top Reply with quote
#5   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
Well chat like you said it was a bug correct? Thats why it wasnt included. Why would put out something that has known bug? I watch the phpbb boards and was waiting for the fix they proposed before I could apply it. Thanks for letting me know they have come up with something I can now apply that to the fix files and make sure that the users get the update. I wasn't meaning to start a flame battle with you and I surely didn't expect you to follow me to my home to flame on me. I simply was asking why do it twice? I wouldn't have done it if I would have known there was a standard about who can apply fixes. Surely I have other things that keep me busy.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#6   re: BBtoNuke 209 update problem
dobbelina
CZ Super Newbie
dobbelina has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 10, 2004
0.01 posts per day
Posts: 58
Points: 3,836
   
No, i got mine from nukeresources.com.
I posted this issue on their board, and this is what they replied:
Originally posted by chatserv:
Try this modification of a workaround suggested by alphamonkey at phpbb.com
in the new common.php find:


function unset_vars(&$var)
{
   while (list($var_name, $null) = @each($var))
   {
      unset($GLOBALS[$var_name]);
   }
   return;
}

change to:


function unset_vars(&$var)
{
  while (list($var_name, $null) = @each($var))
  {
    if ( ! ( $var_name == 'phpbb_root_path' || $var_name == 'no_page_header' || $var_name == 'phpEx' || $var_name == 'admin' || $var_name == 'user' || $var_name == 'name' ) )
    {
      unset($GLOBALS[$var_name]);
    }
  }
  return;
}

this will stop the admin and user globals from being unset although the correct fix would be to stop passing them as globals which i guess will be the next project, for now please post any feedback on the workaround.
I'm no expert, but it seems this fix is only a "workaround".
Now what should i do,should i d/l the "working" update from this site or replace that code
above in common.php on the update i got from nukeresources.com ?
Dobbelina icon_biggrin.gif


Back to top Reply with quote
#7   
Telli
Site Admin
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.03 posts per day
Posts: 8089
Points: 494,475
   
Use that to update or look here this also updated.
[ Register or login to view links on this board. ]

The download was updated also. The only change is to the modules/Forums/common.php

If you need any more help post back.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#8   re: BBtoNuke 209 update problem
dobbelina
CZ Super Newbie
dobbelina has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 10, 2004
0.01 posts per day
Posts: 58
Points: 3,836
   
Thanks a lot !
Since i'm still building the site at home i've decided to grab your " premodded"
files (bbtonuke2.0.8-2.0.9.zip) and use those.
It seems the best thing to do cause i haven't made any major changes to the
original configuration.
Now you helped me again, youre amazing !!!
Many many thanks !
Dobbelina icon_razz.gif



Back to top Reply with quote
#9   
chatserv
CZ Newbie
chatserv has been a member for over 20 year's 20 Year Member
Status: Offline
Joined: Jul 16, 2004
0.00 posts per day
Posts: 2
Points: 192
   


Originally posted by Telli @ Fri Jul 16, 2004 5:38 pm:

Well chat like you said it was a bug correct? Thats why it wasnt included. Why would put out something that has known bug? I watch the phpbb boards and was waiting for the fix they proposed before I could apply it. Thanks for letting me know they have come up with something I can now apply that to the fix files and make sure that the users get the update. I wasn't meaning to start a flame battle with you and I surely didn't expect you to follow me to my home to flame on me. I simply was asking why do it twice? I wouldn't have done it if I would have known there was a standard about who can apply fixes. Surely I have other things that keep me busy.

Don't worry about flame wars, that is not my style and just like you i have better ways to spend my time, as for standards, no, there's none, trace back to all previous versions from NC's 2.1 and NukeResources' 2.0.5, 2.0.6, 2.0.6c, 2.0.7, 2.0.8 and 2.0.8, the last six of which i ported alone and you will find my nick on all, i intend to keep porting them as the NC team that first made one after Tom's version no longer exists and since i always voiced my intention to keep the port alive even if they decided to follow FB when and if he changed the forums i am just making good my word.

Anyway good luck with your projects and all around work, by making the above post i just wanted to clear the full of bugs comment, i don't like having people confused by something that is not even true, bye.



Back to top Reply with quote
#10   re: BBtoNuke 209 update problem
Dauthus
CZ Addict
 Codezwiz Site Donator
Dauthus has been a member for over 20 year's 20 Year Member
usa.gif illinois.gif
Age: 61
Gender: Male
Website:
Status: Offline
Joined: Mar 17, 2004
0.06 posts per day
Posts: 426
Points: 15,917
   
Ok, I just tried to add the "new" verions of this update, and all I get is a blank page with a header where the forum should be.

All I changed from the previous version was the common.php file. Was there anything else I was supposed to change too?



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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 cannot attach files in this forum
You cannot download files in this forum