PHP Web Host - Quality Web Hosting For All PHP Applications Sign up for PayPal and start accepting credit card payments instantly
  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
NeapolitanWorld
New Member
New Member


Joined: Nov 06, 2005
Posts: 12

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

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: 7458
Location: Arizona

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

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


Joined: Nov 06, 2005
Posts: 12

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

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
View user's profile Send private message
NeapolitanWorld
New Member
New Member


Joined: Nov 06, 2005
Posts: 12

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

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
View user's profile Send private message
montego
Site Admin


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

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

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
View user's profile Send private message Visit poster's website
NeapolitanWorld
New Member
New Member


Joined: Nov 06, 2005
Posts: 12

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

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

Best
View user's profile Send private message
montego
Site Admin


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

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

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

Best


Got 'em. Thanks. Will look at them tonight.
View user's profile Send private message Visit poster's website
montego
Site Admin


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

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

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


Joined: Nov 06, 2005
Posts: 12

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

Hi Montego, I'm in business! thank you. Your edits worked.
View user's profile Send private message
montego
Site Admin


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

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

Great to hear. Glad to help.

Cheers
View user's profile Send private message Visit poster's website
Plasma
New Member
New Member


Joined: May 17, 2005
Posts: 4

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

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: 4853

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

Some of the confusion may be caused by multiple versions of the 3.1. You can find details
Only registered users can see links on this board!
Get registered or login to the forums!
.
View user's profile Send private message
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