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 -> NukeSentinel(tm) Bug Reports
Author Message
NeapolitanWorld
Involved
Involved



Joined: Nov 06, 2005
Posts: 339
Location: Los Angeles, USA

PostPosted: Mon Jan 09, 2006 1:50 am Reply with quote

Hi Everyone, I was hoping I could get some help. I installed sentinal 2.4.0 and I'm running Nuke 7.6.0.2.9 (2.9) patched. My installation went ok, but in my "Edit for core files" I run in to a problem. Specifacly with "mainfile7.6".

It asks to find:
Code:
if (defined('FORUM_ADMIN')) {

   @require_once("../../../config.php");
   @require_once("../../../db/db.php");
   @require_once("../../../includes/sql_layer.php");
   if (file_exists("../../../includes/custom_files/custom_mainfile.php")) { @include_once("../../../includes/custom_files/custom_mainfile.php"); }
   @require_once("../../../includes/ipban.php");
   if (defined('NUKE_HEADER') && file_exists("../../../includes/custom_files/custom_head.php")) { @include_once("../../../includes/custom_files/custom_head.php"); }
   if (defined('NUKE_HEADER') && file_exists("../../../includes/custom_files/custom_header.php")) { @include_once("../../../includes/custom_files/custom_header.php"); }
} elseif (defined('INSIDE_MOD')) {
   @require_once("../../config.php");
   @require_once("../../db/db.php");
   @require_once("../../includes/sql_layer.php");
   if (file_exists("../../includes/custom_files/custom_mainfile.php")) { @include_once("../../includes/custom_files/custom_mainfile.php"); }
   @require_once("../../includes/ipban.php");
   if (defined('NUKE_HEADER') && file_exists("../../includes/custom_files/custom_head.php")) { @include_once("../../includes/custom_files/custom_head.php"); }
   if (defined('NUKE_HEADER') && file_exists("../../includes/custom_files/custom_header.php")) { @include_once("../../includes/custom_files/custom_header.php"); }
} else {
   @require_once("config.php");
   @require_once("db/db.php");
   @require_once("includes/sql_layer.php");
   if (file_exists("includes/custom_files/custom_mainfile.php")) { @include_once("includes/custom_files/custom_mainfile.php"); }
   @require_once("includes/ipban.php");
   if (defined('NUKE_HEADER') && file_exists("includes/custom_files/custom_head.php")) { @include_once("includes/custom_files/custom_head.php"); }
   if (defined('NUKE_HEADER') && file_exists("includes/custom_files/custom_header.php")) { @include_once("includes/custom_files/custom_header.php"); }
}


HOWEVER, the best I can find near that in my mainfile.php is:

Quote:
if (!defined('FORUM_ADMIN')) {
if (isset($newlang) AND !eregi("\.","$newlang")) {
if (file_exists("language/lang-".$newlang.".php")) {
setcookie("lang",$newlang,time()+31536000);
@include("language/lang-".$newlang.".php");
$currentlang = $newlang;
} else {
setcookie("lang",$language,time()+31536000);
@include("language/lang-".$language.".php");
$currentlang = $language;
}
} elseif (isset($lang)) {
@include("language/lang-".$lang.".php");
$currentlang = $lang;
} else {
setcookie("lang",$language,time()+31536000);
@include("language/lang-".$language.".php");
$currentlang = $language;
}
}

function get_lang($module) {
global $currentlang, $language;
if (file_exists("modules/$module/language/lang-".$currentlang.".php")) {
if ($module == admin) {
@include_once("admin/language/lang-".$currentlang.".php");
} else {
@include_once("modules/$module/language/lang-".$currentlang.".php");
}
} else {
if ($module != "Forums") {
if ($module == admin) {
@include_once("admin/language/lang-".$currentlang.".php");
} else {
@include_once("modules/$module/language/lang-".$language.".php");
}
}
}
}



After I replace the code that is a little different from the one is asked to replace, my sentinal does work, but I run in to problems with other functions of my nuke, such as surveys/polls, last seen block, site messenger and other. Is there some thing that I'm missing with 2.9? has anyone ran in to this??

thanks for the help in advance
 
View user's profile Send private message
montego
Site Admin



Joined: Aug 29, 2004
Posts: 9457
Location: Arizona

PostPosted: Mon Jan 09, 2006 6:51 am Reply with quote

NeapolitanWorld, I have looked through my "archives" and are you able to find the following bit of code in mainfile.php (around line 112 is the code you should be looking for):

Code:


if (stristr($_SERVER['SCRIPT_NAME'], "mainfile.php")) {
    Header("Location: index.php");
    die();
}

if (defined('FORUM_ADMIN')) {
    @require_once("../../../config.php");
    @require_once("../../../db/db.php");
} elseif (defined('INSIDE_MOD')) {
    @require_once("../../config.php");
    @require_once("../../db/db.php");
} else {
    @require_once("config.php");
    @require_once("db/db.php");
    /* FOLLOWING TWO LINES ARE DEPRECATED BUT ARE HERE FOR OLD MODULES COMPATIBILITY */
    /* PLEASE START USING THE NEW SQL ABSTRACTION LAYER. SEE MODULES DOC FOR DETAILS */
    @require_once("includes/sql_layer.php");
    $dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
}

$mainfile = 1;
$result = $db->sql_query("SELECT * FROM ".$prefix."_config");
$row = $db->sql_fetchrow($result);


I gave you a bit of extra code at the beginning and end to help you find what you need to be looking for.

I am confused by all the extra code you posted including what appears to me to be duplication. Are you sure it is asking you to find all this extra bit of code? I think it is really looking for the


if (defined('FORUM_ADMIN')) {
@require_once("../../../config.php");
@require_once("../../../db/db.php");
} elseif (defined('INSIDE_MOD')) {
@require_once("../../config.php");
@require_once("../../db/db.php");
} else {
@require_once("config.php");
@require_once("db/db.php");
/* FOLLOWING TWO LINES ARE DEPRECATED BUT ARE HERE FOR OLD MODULES COMPATIBILITY */
/* PLEASE START USING THE NEW SQL ABSTRACTION LAYER. SEE MODULES DOC FOR DETAILS */
@require_once("includes/sql_layer.php");
$dbi = sql_connect($dbhost, $dbuname, $dbpass, $dbname);
}


Bit of code and probably asking you to add another require_once to include the sentinel.php scripts (or was it nukesentinel.php by 2.4.0 - can't remember).

Anyways, hopefully that gets you closer. However, I would strongly, strongly, strongly advise you upgrading your site to the latest 3.1 patchset and lastest NukeSentinel 2.4.2.

_________________
Where Do YOU Stand?
HTML Newsletter::ShortLinks::Mailer::Downloads and more... 
View user's profile Send private message Visit poster's website
NeapolitanWorld







PostPosted: Mon Jan 09, 2006 9:28 pm Reply with quote

Thank you for your help. I will for sure upgrade, as soon as I get my install done correctly. In my edits folder for mainfile7.6, here is what is telling me to find:

#-----[ FIND ]------------------------------------------
#
if (defined('FORUM_ADMIN')) {
@require_once("../../../config.php");
@require_once("../../../db/db.php");
@require_once("../../../includes/sql_layer.php");
if (file_exists("../../../includes/custom_files/custom_mainfile.php")) { @include_once("../../../includes/custom_files/custom_mainfile.php"); }
@require_once("../../../includes/ipban.php");
if (defined('NUKE_HEADER') && file_exists("../../../includes/custom_files/custom_head.php")) { @include_once("../../../includes/custom_files/custom_head.php"); }
if (defined('NUKE_HEADER') && file_exists("../../../includes/custom_files/custom_header.php")) { @include_once("../../../includes/custom_files/custom_header.php"); }
} elseif (defined('INSIDE_MOD')) {
@require_once("../../config.php");
@require_once("../../db/db.php");
@require_once("../../includes/sql_layer.php");
if (file_exists("../../includes/custom_files/custom_mainfile.php")) { @include_once("../../includes/custom_files/custom_mainfile.php"); }
@require_once("../../includes/ipban.php");
if (defined('NUKE_HEADER') && file_exists("../../includes/custom_files/custom_head.php")) { @include_once("../../includes/custom_files/custom_head.php"); }
if (defined('NUKE_HEADER') && file_exists("../../includes/custom_files/custom_header.php")) { @include_once("../../includes/custom_files/custom_header.php"); }
} else {
@require_once("config.php");
@require_once("db/db.php");
@require_once("includes/sql_layer.php");
if (file_exists("includes/custom_files/custom_mainfile.php")) { @include_once("includes/custom_files/custom_mainfile.php"); }
@require_once("includes/ipban.php");
if (defined('NUKE_HEADER') && file_exists("includes/custom_files/custom_head.php")) { @include_once("includes/custom_files/custom_head.php"); }
if (defined('NUKE_HEADER') && file_exists("includes/custom_files/custom_header.php")) { @include_once("includes/custom_files/custom_header.php"); }
}

As stated in the text file, it may not be the same as the one in my nuke 7.6, which is not, it is much shorter, maybe the same you wrote on your post. However, after I add the following code per instructions:

#-----[ CHANGE TO ]------------------------------------------
#
if (defined('FORUM_ADMIN')) {
@require_once("../../../config.php");
@require_once("../../../db/db.php");
@require_once("../../../includes/sql_layer.php");
if (file_exists("../../../includes/custom_files/custom_mainfile.php")) { @include_once("../../../includes/custom_files/custom_mainfile.php"); }
//@require_once("../../../includes/ipban.php");
@include_once("../../../includes/nukesentinel.php");
if (defined('NUKE_HEADER') && file_exists("../../../includes/custom_files/custom_head.php")) { @include_once("../../../includes/custom_files/custom_head.php"); }
if (defined('NUKE_HEADER') && file_exists("../../../includes/custom_files/custom_header.php")) { @include_once("../../../includes/custom_files/custom_header.php"); }
} elseif (defined('INSIDE_MOD')) {
@require_once("../../config.php");
@require_once("../../db/db.php");
@require_once("../../includes/sql_layer.php");
if (file_exists("../../includes/custom_files/custom_mainfile.php")) { @include_once("../../includes/custom_files/custom_mainfile.php"); }
//@require_once("../../includes/ipban.php");
@include_once("../../includes/nukesentinel.php");
if (defined('NUKE_HEADER') && file_exists("../../includes/custom_files/custom_head.php")) { @include_once("../../includes/custom_files/custom_head.php"); }
if (defined('NUKE_HEADER') && file_exists("../../includes/custom_files/custom_header.php")) { @include_once("../../includes/custom_files/custom_header.php"); }
} else {
@require_once("config.php");
@require_once("db/db.php");
@require_once("includes/sql_layer.php");
if (file_exists("includes/custom_files/custom_mainfile.php")) { @include_once("includes/custom_files/custom_mainfile.php"); }
//@require_once("includes/ipban.php");
@include_once("includes/nukesentinel.php");
if (defined('NUKE_HEADER') && file_exists("includes/custom_files/custom_head.php")) { @include_once("includes/custom_files/custom_head.php"); }
if (defined('NUKE_HEADER') && file_exists("includes/custom_files/custom_header.php")) { @include_once("includes/custom_files/custom_header.php"); }
}


It istalls and I can work with sentinal admin, however my nuke does not work properly. The problems I have are things like survy's/polls not working and some other thigs as well. I have done all my previous edits already, however this one, seams to have a problem with my nuke. Sorry I know I'm being a little repetative, but maybe I did not explain right, or I'm not sure if I got your post right.
Please, anyone, much appriciated the help you can provide.

Best
 
NeapolitanWorld







PostPosted: Mon Jan 09, 2006 9:38 pm Reply with quote

Looking at the code next to each other, it looks identical. Can some one confirm the code that is given for mainfile7.6 and sentinal 2.4.0.

thanks
 
montego







PostPosted: Tue Jan 10, 2006 6:32 am Reply with quote

NeapolitanWorld, Please send me both the original mainfile.php (that you started with) and the file which has the core file edit instructions in it for 2.4.0 and I'll incorporate it for you. You may send it to montego _at_ montegoscripts dot com.

Please be patient, though, I have a day job and night job (family). I should be able to give it back to you by around this time tomorrow.

Regards, montego
 
NeapolitanWorld







PostPosted: Tue Jan 10, 2006 11:39 am Reply with quote

Thank you Montego. Very kind of you. Files are in your e-mail.

Best
 
montego







PostPosted: Tue Jan 10, 2006 8:44 pm Reply with quote

NeapolitanWorld wrote:
Thank you Montego. Very kind of you. Files are in your e-mail.

Best


Got 'em. Thanks. Will look at them tonight.
 
montego







PostPosted: Wed Jan 11, 2006 7:02 am Reply with quote

NeapolitanWorld, I sent the edited mainfile.php back to you, however, as noted in my message, the original unedited script is not from the same nuke version (as best I can tell -- too many differences) than the second "edited" file you provided. So, if I did not edit the right script, please resend me the mainfile.php script from the nuke version you are trying to install NS on. Thanks.
 
NeapolitanWorld







PostPosted: Wed Jan 11, 2006 8:50 am Reply with quote

Hi Montego, I'm in business! thank you. Your edits worked.
 
montego







PostPosted: Wed Jan 11, 2006 9:24 am Reply with quote

Great to hear. Glad to help.

Cheers
 
Plasma
Regular
Regular



Joined: May 17, 2005
Posts: 66

PostPosted: Sun Jun 04, 2006 8:35 pm Reply with quote

Hello All!

I too have this problem. i downloaded phpnuke 7.6 Patched from NukeResources. the code i have in my mainfile.php is identical to NeapolitanWorld's as show in his first post of this topic. can someone please show me how to change mine correctly? and it's patched 3.1

thx
 
View user's profile Send private message
kguske
Site Admin



Joined: Jun 04, 2004
Posts: 6432

PostPosted: Mon Jun 05, 2006 11:53 am Reply with quote

Some of the confusion may be caused by multiple versions of the 3.1. You can find details here.

_________________
I search, therefore I exist...
nukeSEO - nukeFEED - nukePIE - nukeSPAM - nukeWYSIWYG
 
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.    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel(tm) Bug Reports

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 ©