You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 40 guest(s) and 1 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Upgrade path help [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
gunner
Sergeant
Sergeant


Joined: Jul 07, 2003
Posts: 140


PostPosted: Wed Jul 30, 2003 4:09 pm Reply with quoteBack to top

Question#1
I initially installed nuke 6.5 (no probs)...then I applied sec patch #4 (no probs), however now my nuke version lists as
Quote:
PHP-Nuke Version: 6.7
So the question is what version am I truly running? (i.e. an upgraded 6.5 or a full 6.7).

Question#2
Quote:
My Forum list as: phpBB port v2.1 based on Tom Nitzschner's phpbb2.0.6 upgraded to phpBB 2.0.4.
Would a good upgrade path be
Quote:
Nuke Cops releases PHP-Nuke 6.5 Enhanced Bundle


BTW I have some blocks that use the db (egallery, phpbb2 main menu, phpbb2 user menu, shoutbox). Would these be affected by an upgrade to the enhance 6.5? or is the db the same? Thanks
Find all posts by gunnerView user's profileSend private messageVisit poster's website
chatserv
General
General


Joined: Jan 12, 2003
Posts: 3128

Location: Puerto Rico

PostPosted: Wed Jul 30, 2003 4:18 pm Reply with quoteBack to top

Maybe you ran a file that was only intended for users of nuke 6.7, verify that by reading the fixchanges file, if that was the case change the version number back to 6.5 in the nuke_config database table.

_________________
Feed a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
ScriptHeaven | NukeResources
Find all posts by chatservView user's profileSend private messageVisit poster's website
gunner
Sergeant
Sergeant


Joined: Jul 07, 2003
Posts: 140


PostPosted: Wed Jul 30, 2003 5:30 pm Reply with quoteBack to top

Here is the fixlist text:

Quote:
1-rename
modules/Forums/admin/admin_styles.php
to
modules/Forums/admin/admin_styles.disabled (or delete it)

2-PHP-Nuke-6.7\html\admin\modules\newsletter.php
line 85 is
echo "<center><font class=\"content\"><b>"._MASSIVEEMAIL."</b></font>"

but should be
echo "<center><font class=\"content\"><b>"._MASSEMAIL."</b></font>"

3-PHP-Nuke-6.7\html\admin\modules\settings.php
line 287 is
."<option name='xhttprefmax' value='1000'>2000</option>"

but should be
."<option name='xhttprefmax' value='2000'>2000</option>"

4-Open /mainfile.php and inside the ultramode function, find
$result = $db->sql_query($result);
$row2 = $db->sql_fetchrow($result);

replace with
$result2 = $db->sql_query($sql);
$row2 = $db->sql_fetchrow($result2);

Open /admin/modules/stories.php and inside the postAdminStory function, find
global $aid, $prefix, $dbi;

replace with
global $ultramode, $aid, $prefix, $dbi;

5-do a site wide find and replace for
= $row[sid];

and replace with
= $row['sid'];
Suggested files to apply this fix to:
\blocks\block-Big_Story_of_Today.php
\blocks\block-Last_5_Articles.php
\blocks\block-Old_Articles.php
\modules\AvantGo\index.php
\modules\News\article.php
\modules\News\categories.php
\html\modules\News\comments.php
\html\modules\News\index.php
\html\modules\Top\index.php
\admin.php

6-Open /blocks/block-Forum.php and find
if (($auth_view != 2) OR ($auth_read != 2)) {

replace with
if (($auth_view < 2) OR ($auth_read < 2)) {

7-Open modules/Your_Account/index.php and replace the entire function login with:
function login($username, $user_password, $redirect, $mode, $f, $t, $random_num, $gfx_check) {
global $setinfo, $user_prefix, $db, $module_name, $pm_login, $prefix;
include("config.php");
$sql = "SELECT user_password, user_id, storynum, umode, uorder, thold, noscore, ublockon, theme, commentmax, user_active FROM ".$user_prefix."_users WHERE username='$username'";
$result = $db->sql_query($sql);
$setinfo = $db->sql_fetchrow($result);
$forward = ereg_replace("redirect=", "", "$redirect");
if (ereg("privmsg", $forward)) {
$pm_login = "active";
}
if (($db->sql_numrows($result)==1) AND ($setinfo[user_id] != 1) AND ($setinfo[user_password] != "") AND ($setinfo[user_active] == 1 )) {
$dbpass=$setinfo[user_password];
$non_crypt_pass = $user_password;
$old_crypt_pass = crypt($user_password,substr($dbpass,0,2));
$new_pass = md5($user_password);
if (($dbpass == $non_crypt_pass) OR ($dbpass == $old_crypt_pass)) {
$db->sql_query("UPDATE ".$user_prefix."_users SET user_password='$new_pass' WHERE username='$username'");
$sql = "SELECT user_password FROM ".$user_prefix."_users WHERE username='$username'";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$dbpass = $row[user_password];
}
if ($dbpass != $new_pass) {
Header("Location: modules.php?name=$module_name&stop=1");
return;
}
$datekey = date("F j");
$rcode = hexdec(md5($_SERVER[HTTP_USER_AGENT] . $sitekey . $random_num . $datekey));
$code = substr($rcode, 2, 6);
if (extension_loaded("gd") AND $code != $gfx_check) {
Header("Location: modules.php?name=$module_name&stop=1");
die();
} else {
docookie($setinfo[user_id], $username, $new_pass, $setinfo[storynum], $setinfo[umode], $setinfo[uorder], $setinfo[thold], $setinfo[noscore], $setinfo[ublockon], $setinfo[theme], $setinfo[commentmax]);
$uname = $_SERVER["REMOTE_ADDR"];
$db->sql_query("DELETE FROM ".$prefix."_session WHERE uname='$uname' AND guest='1'");
}
if ($pm_login != "") {
Header("Location: modules.php?name=Private_Messages&file=index&folder=inbox");
exit;
}
if ($redirect == "" ) {
Header("Location: modules.php?name=Your_Account&op=userinfo&bypass=1&username=$username");
} else if ($mode == "") {
Header("Location: modules.php?name=Forums&file=$forward");
} else if ($t !="") {
Header("Location: modules.php?name=Forums&file=$forward&mode=$mode&t=$t");
} else {
Header("Location: modules.php?name=Forums&file=$forward&mode=$mode&f=$f");
}
} else {
Header("Location: modules.php?name=$module_name&stop=1");
}
}

8-Upload blank.gif to modules/Forums/images/avatars

9-in modules/Private_Messages/index.php find this:
if ($popup != "1") {
$module_name = basename(dirname(__FILE__));
require("modules/Forums/nukebb.php");
if (is_user($user)) {
include("modules/Your_Account/navbar.php");
OpenTable();
nav();
CloseTable();
echo "<br>";
}

change to:
if ($row[custom_name] == "") {
$mod_name = ereg_replace("_", " ", $name);
} else {
$mod_name = $row[custom_name];
}
if ($popup != "1") {
$module_name = basename(dirname(__FILE__));
require("modules/Forums/nukebb.php");
title("$sitename: $mod_name");
if (is_user($user)) {
include("modules/Your_Account/navbar.php");
OpenTable();
nav();
CloseTable();
echo "<br>";
}

Open includes/page_header.php find this code:
if (!$is_inline_review) {
title("$sitename: $mod_name");
OpenTable();
}

replace it with this one:
if (!$is_inline_review & $mod_name != "Private Messages") {
title("$sitename: $mod_name");
}
OpenTable();

10-Open modules/Your_Account/index.php and find around line 545:
$sql = "SELECT custom_title FROM ".$prefix."_modules WHERE active='1' AND view='1'";

change to:
$sql = "SELECT custom_title FROM ".$prefix."_modules WHERE active='1' AND view='1' AND inmenu='1'";

11-Open language/lang-YOUR_LANGUAGE.php and copy the define for:
define("_HREADMORE","...");
save it in a new line after removing the H like:
define("_READMORE","...");

12-Open modules/Your_Account/index.php
search for:
$result3 = $db->sql_query($sq3);
Replace with:
$result3 = $db->sql_query($sql3);

13-Open modules/Your_Account/index.php
search for:
echo "<b>"._LAST10COMMENTS." $username:</b><br>";
$sql6 = "SELECT tid, sid, subject FROM ".$prefix."_comments WHERE name='$username' ORDER BY tid DESC LIMIT 0,10";
Replace with:
echo "<b>"._LAST10COMMENTS." $userinfo[username]:</b><br>";
$sql6 = "SELECT tid, sid, subject FROM ".$prefix."_comments WHERE name='$userinfo[username]' ORDER BY tid DESC LIMIT 0,10";

search for:
echo "<b>"._LAST10SUBMISSIONS." $username:</b><br>";
$sql7 = "SELECT sid, title FROM ".$prefix."_stories WHERE informant='$username' ORDER BY sid DESC LIMIT 0,10";
Replace with:
echo "<b>"._LAST10SUBMISSIONS." $userinfo[username]:</b><br>";
$sql7 = "SELECT sid, title FROM ".$prefix."_stories WHERE informant='$userinfo[username]' ORDER BY sid DESC LIMIT 0,10";

14-Around line 73 of modules/Journal/savenew.php find:
$sql="INSERT INTO ".$prefix."_journal (jid,aid,title,bodytext,mood,pdate,ptime,status,mtime,mdate) VALUES ('','$username','$title','$bodytext','$mood','$pdate','$ptime','$status','$mtime','$ndate')";
Before that line add:
$title = stripslashes(FixQuotes($title));
$bodytext = stripslashes(FixQuotes($bodytext));

15-In phpnuke 6.7 mainfile.php about line 72:
} elseif (inside_mod == 1) {
Should be changed to :
} elseif ($inside_mod == 1) {

16-open viewtopic.php and before:
if ( isset($HTTP_GET_VARS[POST_TOPIC_URL]) )
{
$topic_id = intval($HTTP_GET_VARS[POST_TOPIC_URL]);
}
else if ( isset($HTTP_GET_VARS['topic']) )
{
$topic_id = intval($HTTP_GET_VARS['topic']);
}

add:
$topic_id = $post_id = false;

Scroll down and find:
$join_sql_table = ( !isset($post_id) ) ? '' : ", " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2 ";
$join_sql = ( !isset($post_id) ) ? "t.topic_id = $topic_id" : "p.post_id = $post_id AND t.topic_id = p.topic_id AND p2.topic_id = p.topic_id AND p2.post_id <= $post_id";
$count_sql = ( !isset($post_id) ) ? '' : ", COUNT(p2.post_id) AS prev_posts";

$order_sql = ( !isset($post_id) ) ? '' : "GROUP BY p.post_id, t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments ORDER BY p.post_id ASC";

Change that to:
$join_sql_table = ( empty($post_id) ) ? '' : ", " . POSTS_TABLE . " p, " . POSTS_TABLE . " p2 ";
$join_sql = ( empty($post_id) ) ? "t.topic_id = $topic_id" : "p.post_id = $post_id AND t.topic_id = p.topic_id AND p2.topic_id = p.topic_id AND p2.post_id <= $post_id";
$count_sql = ( empty($post_id) ) ? '' : ", COUNT(p2.post_id) AS prev_posts";

$order_sql = ( empty($post_id) ) ? '' : "GROUP BY p.post_id, t.topic_id, t.topic_title, t.topic_status, t.topic_replies, t.topic_time, t.topic_type, t.topic_vote, t.topic_last_post_id, f.forum_name, f.forum_status, f.forum_id, f.auth_view, f.auth_read, f.auth_post, f.auth_reply, f.auth_edit, f.auth_delete, f.auth_sticky, f.auth_announce, f.auth_pollcreate, f.auth_vote, f.auth_attachments ORDER BY p.post_id ASC";

17-Open modules/Forums/admin/admin_styles.php and find:
//
// Load default header
//
//
// Check if the user has cancled a confirmation message.
//
$phpbb_root_path = "./../";

$confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : FALSE;
$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : FALSE;

if (empty($HTTP_POST_VARS['send_file']))
{
$no_page_header = ( $cancel ) ? TRUE : FALSE;
require($phpbb_root_path . 'extension.inc');
require('./pagestart.' . $phpEx);
}

if ($cancel)
{
redirect('admin/' . append_sid("admin_styles.$phpEx", true));
}

Replace with:
//
// Load default header
//
//
// Check if the user has cancled a confirmation message.
//
$phpbb_root_path = "./../";
require($phpbb_root_path . 'extension.inc');

$confirm = ( isset($HTTP_POST_VARS['confirm']) ) ? TRUE : FALSE;
$cancel = ( isset($HTTP_POST_VARS['cancel']) ) ? TRUE : FALSE;

$no_page_header = (!empty($HTTP_POST_VARS['send_file']) || $cancel) ? TRUE : FALSE;

require('./pagestart.' . $phpEx);

if ($cancel)
{
redirect('admin/' . append_sid("admin_styles.$phpEx", true));
}

As stated elsewhere in this list you could also delete the admin styles file.

18-Only applies to those using PHP-Nuke 6.7
Run updatenuke.php from Nuke's root directory.

19-Open modules/Forums/search.php and find:
WHERE poster_id = " . $userdata['user_id'];;

change to:
WHERE poster_id = " . $userdata['user_id'];

Open modules/Forums/modcp.php and find:
$post_id_sql .= (($post_id_sql != '') ? ', ' : '') . intval($row['post_id']);;

change to:
$post_id_sql .= (($post_id_sql != '') ? ', ' : '') . intval($row['post_id']);

20-open modules/Your_Account/index.php and search for:
$user_avatar = "$user_avatar";

replace with:
$user_avatar = "gallery/$user_avatar";

21-Open modules/WebMail/contactbook.php and find:
$res = sql_query($query);

Change to:
$res = sql_query($query, $dbi);


And this was the update to nuke.php file:

Code:
?php

######################################################
#            -= WARNING: PLEASE READ =-
#
# NOTE: This file uses config.php to retrieve needed
# variables values. So, to do the upgrade PLEASE copy
# this file in your server root directory and execute
# it from your browser.
######################################################

include("mainfile.php");

[quote]// PHP-Nuke Version Number Update
$db->sql_query("UPDATE ".$prefix."_config SET Version_Num='6.7'");

echo "Update finished!<br><br>"
    ."You should now delete this upgrade file from your server. Go to your <a href=\"index.php\">website</a>.";

?>

And the file name was sec-fix4.zip
Find all posts by gunnerView user's profileSend private messageVisit poster's website
gunner
Sergeant
Sergeant


Joined: Jul 07, 2003
Posts: 140


PostPosted: Fri Aug 01, 2003 7:47 am Reply with quoteBack to top

Chatserv,

With the information above can you tell if I have a complete 6.7 nuke site or a hybrid 6.5? The only changes I made were from a file I downloaded called sec-fix4.zip (I think I d/l it from here?). I'm just not sure what my next upgrade should be. Thanks
Find all posts by gunnerView user's profileSend private messageVisit poster's website
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next 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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.204 Seconds - 230 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::