PHP Web Host - Quality Web Hosting For All PHP Applications $35/month $250/year (Unlimited) - $25/month - 200,000 impressions - Your Ad Could be Here - Click For Details
  Login or Register
 • Home • Downloads • Your Account • Forums • 

View next topic
View previous topic


Google
 
Web RavenPHPScripts (This Site)
Post new topic   Reply to topic
Author Message
southern
Client


Joined: Jan 29, 2004
Posts: 530
Location: Texas

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

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 Visit poster's website
evaders99
Moderator


Joined: Apr 30, 2004
Posts: 2793

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

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


Joined: Jan 29, 2004
Posts: 530
Location: Texas

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

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


Joined: Apr 30, 2004
Posts: 2793

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

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


Joined: Jan 29, 2004
Posts: 530
Location: Texas

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

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


Joined: Jan 29, 2004
Posts: 530
Location: Texas

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

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 to the forums!
--
Only registered users can see links on this board!
Get registered or login to the forums!
*/
/************************************************************************/

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?
View user's profile Send private message Visit poster's website
evaders99
Moderator


Joined: Apr 30, 2004
Posts: 2793

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

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");
}
View user's profile Send private message Visit poster's website
southern
Client


Joined: Jan 29, 2004
Posts: 530
Location: Texas

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

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


Joined: Jan 29, 2004
Posts: 530
Location: Texas

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

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


Joined: Apr 30, 2004
Posts: 2793

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

Also, you'd have to check every modules/*/admin directory too
Could be any of those
View user's profile Send private message Visit poster's website
southern
Client


Joined: Jan 29, 2004
Posts: 530
Location: Texas

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

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


Joined: Jan 29, 2004
Posts: 530
Location: Texas

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

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


Joined: Jan 29, 2004
Posts: 530
Location: Texas

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

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


Joined: Apr 30, 2004
Posts: 2793

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

Odd.. where is $domain defined then. That's probably what you're missing
View user's profile Send private message Visit poster's website
southern
Client


Joined: Jan 29, 2004
Posts: 530
Location: Texas

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

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?
View user's profile Send private message Visit poster's website
evaders99
Moderator


Joined: Apr 30, 2004
Posts: 2793

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

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

$domain = "www.southernwolf.net";
View user's profile Send private message Visit poster's website
southern
Client


Joined: Jan 29, 2004
Posts: 530
Location: Texas

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

OK Thanks for your kind assistance Smile
View user's profile Send private message Visit poster's website
Display posts from previous:       
Post new topic   Reply to topic

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-2008 by Raven
Proud to be listed at Lobo Links Web Directory

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 Recoded To 100% W3C CSS & HTML 4.01 Transitional Compliance by Raven and 64bitguy ::

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

zerosum