Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Ravens PHP Scripts And Web Hosting Forum Index -> PHP-Nuke Patched Series By Chatserv
Author Message
southern
Client



Joined: Jan 29, 2004
Posts: 624

PostPosted: Tue Jan 03, 2006 9:31 pm Reply with quote

Hi chatserv, I've got a question about the 3.1 upgrade.php file. To upgrade my nuke 7.1 from patch level 2.9 to 3.1 I'm supposed to upload the 72-73 3.1 files first then upload the few 70-71 files. OK. Among the 72-73 files for the root is an upgrade.php file, should I run this file via the browser after u/ling the 72-73 files and before u/ling the 70-71 files? Thanks Smile
 
View user's profile Send private message
evaders99
Former Moderator in Good Standing



Joined: Apr 30, 2004
Posts: 3221

PostPosted: Tue Jan 03, 2006 10:32 pm Reply with quote

Huh? You are doing a Nuke version upgrade as well?
Or what?

If you are sticking with 7.1, use the Patched files for designed for Nuke 7.0-7.1
Otherwise, you'll need to actually use the phpNuke package you want to upgrade to before using the releveant Patched files

_________________
- Star Wars Rebellion Network -

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







PostPosted: Wed Jan 04, 2006 10:31 am Reply with quote

I wish I were upgrading to another nuke version, evader, but I'm not. Smile I have the 70-71 3.1 patch but the instructions are to first put on the 72-73 3.1 patch files. OK, fine, but one of those 72-73 patch files that go in the root is an upgrade.php file so I wondered about it.
instructions:
Quote:

The latest patch for PHP-Nuke 7.0 and 7.1
Just about all variables have been secured against sql injection by running a check on their content before inserting anything into the database tables and after having extracted anything from them as well, any module that had not been secured before has been included as well as all admin files.
NOTE: To patch Nuke 7.0 and 7.1 with NP 3.1 you first need to download 72-73patched, upload the 72-73 patch then upload the few files included with the 70-71 patch.

I looked at it last night and it is to upgrade the stories database, not the nuke version.
snip from 72-73 3.1 upgrade.php:
Code:


<?php

require_once("mainfile.php");
include("header.php");
title("Correcting username length in db tables");
OpenTable();

$result = $db->sql_query("alter table ".$prefix."_stories change informant informant...

Not at all similar to a nuke version upgrade file which would be named upgrade71-72.php etc. anyway... So I'm going to load the thing and run the upgrade.php.
 
evaders99







PostPosted: Wed Jan 04, 2006 4:12 pm Reply with quote

LOL okay

I gotcha. chatserv didn't put a complete 70-71 package. He's using 71-72 as a base and supplementing with the 70-71 files.

I believe you can just run the upgrade.php script once. It should do the same changes.
 
southern







PostPosted: Wed Jan 04, 2006 7:51 pm Reply with quote

Well, that's why I was initially confused, not that it takes much to confuse me haha... anyway I've been putting in third party codes in the 72-73 files so my stuff will work and after I find something 86 proof or higher to steady my nerves I'll see how it goes. Smile
 
southern







PostPosted: Fri Jan 06, 2006 2:30 pm Reply with quote

OK... I had some things to do but I finally loaded the 72-73 3.1 files and ran the upgrade.php. Everything went fine except now I have no right blocks. How do I get them back? From the readme I guess I need to change some codes here and there...
Quote:

/************************************************************************/
/* PHP-Nuke Patched -- 2005 chatserv */
/* Nuke Patched DEV Team -- Evaders99 & Quake */
/* [ Only registered users can see links on this board! Get registered or login! ] -- [ Only registered users can see links on this board! Get registered or login! ] */
/************************************************************************/

Important notes relating to Nuke Patched 3.1:

1- If you want right side blocks to appear in third party add-ons change:
In Modules:
index = 1;
to:
define('INDEX_FILE', true);
In Themes:
if ($index == 1) {
to:
if (defined('INDEX_FILE')) {

2- Additional changes for third party add-ons:
if ($mainfile == 1) {
should be changed to:
if (defined('NUKE_FILE')) {

if ($module == 1) {
should be changed to:
if (defined('MODULE_FILE')) {

if ($footer == 1) {
should be changed to:
if (defined('NUKE_FOOTER')) {

if ($header == 1) {
should be changed to:
if (defined('NUKE_HEADER')) {

In addition I am getting an 'Access Denied' message on my admin page... What to do about that?
 
evaders99







PostPosted: Fri Jan 06, 2006 8:17 pm Reply with quote

in your theme.php
Code:


if ($index == 1) {
to:
if (defined('INDEX_FILE')) {


Access Denied in your admin page is usually caused by addons scripts. You'd have to check the files in your /admin directory and replace the code with

Code:


if (!defined('ADMIN_FILE')) {
   die ("Access Denied");
}
 
southern







PostPosted: Fri Jan 06, 2006 8:30 pm Reply with quote

Thanks very much, evader. My right blocks are back now and right after Friday Night Smackdown I'll check the files in my /admin. Smile
 
southern







PostPosted: Fri Jan 06, 2006 11:00 pm Reply with quote

Well, I'm stumped! I checked my/admin/case, /links and /modules files and changed the codes in addons to the 3.1 version. I looked at my admin.php and it seems OK, it's what was included w/3.1... and still I get an Access Denied. I'm sure the problem is simple to fix but I can't seem to find it.
codes I found and replaced:
Code:


if (!eregi("admin.php", $PHP_SELF)) { die ("Access Denied"); }

if (!eregi("".$admin_file.".php", $_SERVER['PHP_SELF'])) { die ("Access Denied"); }

if ($admin_file == '') { $admin_file = 'admin'; }

except the last one which is innocuous.
 
evaders99







PostPosted: Fri Jan 06, 2006 11:14 pm Reply with quote

Also, you'd have to check every modules/*/admin directory too
Could be any of those
 
southern







PostPosted: Sat Jan 07, 2006 9:46 am Reply with quote

Ah.... in the /modules directory. OK. So I know what I'm looking for but not exactly where lol It narrows it down a bit that it has to be an addon since all the standard nuke modules already have the code.
 
southern







PostPosted: Sat Jan 07, 2006 11:26 am Reply with quote

Well I looked in /modules and found some old codes in my shoutbox admin and replaced them but still I get the Access Denied. I'm wondering about admin.php.
admin.php:
Code:


define('ADMIN_FILE', true);

if(isset($aid)) {
  if($aid AND (!isset($admin) OR empty($admin)) AND $op!='login') {
    unset($aid);
    unset($admin);
    die("Access Denied");
  }

Is this correct?
I just got a feedback from someone who tried to join my site,
Message: Unable to register,security code generator u/s.
 
southern







PostPosted: Sat Jan 07, 2006 12:21 pm Reply with quote

I restored my backup admin.php and lo and behold I don't get the Access Denied. It is the 2.9 patch level and seems the same as 3.1 except for
Code:


//Uncomment the following lines after setting the site url in the Administration
global $domain;
if (!stripos_clone($_SERVER['HTTP_HOST'], $domain)) {
  die("Access denied");
}

vs.
// Uncomment the following block of code after editing the next line to match your site domain
$domainname = "www.southernwolf.net";
if ($_SERVER['SERVER_NAME'] != $domainname ) {
  echo "Access denied";
  die();
}

The first is from the 3.1 admin.php, the second from my backup 2.9 admin.php which allows me in... now I need some more 86 proof medicine lol
 
evaders99







PostPosted: Sat Jan 07, 2006 4:35 pm Reply with quote

Odd.. where is $domain defined then. That's probably what you're missing
 
southern







PostPosted: Sat Jan 07, 2006 5:10 pm Reply with quote

I would assume it is defined in some root file that's called by other files. I dunno where it's defined but if you find out let me know. Smile

edit:
It is defined in the 3.1 mainfile.php
Code:


$domain = str_replace("http://", "", $nukeurl);

Now if I put my domain in there it would be called by admin.php, or should I look for $nukeurl?
 
evaders99







PostPosted: Sun Jan 08, 2006 12:45 am Reply with quote

Ah just go ahead and put your domain in there
Code:


$domain = "www.southernwolf.net";
 
southern







PostPosted: Sun Jan 08, 2006 8:29 am Reply with quote

OK Thanks for your kind assistance Smile
 
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.    Ravens PHP Scripts And Web Hosting Forum Index -> PHP-Nuke Patched Series By Chatserv

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 ©