Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel(tm) v2.6.x
Author Message
doffer83
Worker
Worker



Joined: Apr 17, 2011
Posts: 117
Location: Amsterdam

PostPosted: Mon Jan 28, 2013 4:42 am Reply with quote

I searched a lot and tried many things but without success... I moved an old nuke site to another webhosting company (for a good friend). it went okay but I had to fix many errors ...

When I uncomment the code in mainfile.php

Code:
require_once(INCLUDE_PATH."includes/nukesentinel.php");


the site works again. but when I remove the // before that code I get only blank site. on the first server everything's worked okay even nukesentinel

when I delete or uncomment the code of the mainfile nukesentinel does not work Sad


other code I also tried

Code:



/************************************************************************/
/* This file is for instructional use.                                  */
/* By: NukeScripts Network (webmaster@nukescripts.net)                  */
/* http://www.nukescripts.net                                           */
/* Modifications Copyright © 2000-2006 by NukeScripts Network           */
/************************************************************************/
/* Based on Patched 3.1 mainfile.php your mainfile.php may differ from  */
/* the examples found here.                                             */
/************************************************************************/

#
#-----[ OPEN ]------------------------------------------
#
mainfile.php

#
#-----[ 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"); }
}

#
#-----[ 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"); }
}


#
#-----[ FIND ]------------------------------------------
#
//Union Tap
//Copyright Zhen-Xjell 2004 http://nukecops.com
//Beta 3 Code to prevent UNION SQL Injections
unset($matches);
unset($loc);
if(isset($_SERVER['QUERY_STRING'])) {
if (preg_match("/([OdWo5NIbpuU4V2iJT0n]{5}) /", rawurldecode($loc=$_SERVER['QUERY_STRING']), $matches)) {
    die('Illegal Operation');
  }
}

#
#-----[ COMMENT OUT ]------------------------------------------
#
//Union Tap
//Copyright Zhen-Xjell 2004 http://nukecops.com
//Code to prevent UNION SQL Injections
//unset($matches);
//unset($loc);
//if(isset($_SERVER['QUERY_STRING'])) {
//  if (preg_match("/([OdWo5NIbpuU4V2iJT0n]{5}) /", rawurldecode($loc=$_SERVER['QUERY_STRING']), $matches)) {
//    die('Illegal Operation');
//  }
//}


#
#-----[ FIND ]------------------------------------------
#
if(!file_exists('includes/nukesentinel.php')) {
  if(isset($_SERVER['QUERY_STRING']) && (!stripos_clone($_SERVER['QUERY_STRING'], "ad_click") || !stripos_clone($_SERVER['QUERY_STRING'], "url"))) {
    $queryString = $_SERVER['QUERY_STRING'];
    if (stripos_clone($queryString,'%20union%20') OR stripos_clone($queryString,'/*') OR stripos_clone($queryString,'*/union/*') OR stripos_clone($queryString,'c2nyaxb0') OR stripos_clone($queryString,'+union+') OR stripos_clone($queryString,'http://') OR (stripos_clone($queryString,'cmd=') AND !stripos_clone($queryString,'&cmd')) OR (stripos_clone($queryString,'exec') AND !stripos_clone($queryString,'execu')) OR stripos_clone($queryString,'concat')) {
      die('Illegal Operation');
    }
  }
}

#
#-----[ COMMENT OUT ]------------------------------------------
#
//if(!file_exists('includes/nukesentinel.php')) {
//  if(isset($_SERVER['QUERY_STRING']) && (!stripos_clone($_SERVER['QUERY_STRING'], "ad_click") || !stripos_clone($_SERVER['QUERY_STRING'], "url"))) {
//    $queryString = $_SERVER['QUERY_STRING'];
//    if (stripos_clone($queryString,'%20union%20') OR stripos_clone($queryString,'/*') OR stripos_clone($queryString,'*/union/*') OR stripos_clone($queryString,'c2nyaxb0') OR stripos_clone($queryString,'+union+') OR stripos_clone($queryString,'http://') OR (stripos_clone($queryString,'cmd=') AND !stripos_clone($queryString,'&cmd')) OR (stripos_clone($queryString,'exec') AND !stripos_clone($queryString,'execu')) OR stripos_clone($queryString,'concat')) {
//      die('Illegal Operation');
//    }
//  }
//}


in function function online() {
#
#-----[ FIND ]------------------------------------------
#
function online() {
  global $user, $cookie, $prefix, $db;
  $ip = $_SERVER['REMOTE_ADDR'];

#
#-----[ CHANGE TO ]------------------------------------------
#
function online() {
  global $nsnst_const, $user, $cookie, $prefix, $db;
  if(!file_exists('includes/nukesentinel.php')) {
    $ip = $_SERVER['REMOTE_ADDR'];
  } else {
    $ip = $nsnst_const['remote_ip'];
  }


version of the site is nuke 7.9 patched 3.3 phpbbtonuke 2.23

it would be great if you have an idea about this the matter ... I need to get sentinel working again

your help is appreciated

_________________
We are sorry that Tony Soprano is dead, We wish Assad the Syrian maffia boss had died instead. RIP Tony 
View user's profile Send private message Visit poster's website
nuken
RavenNuke(tm) Development Team



Joined: Mar 11, 2007
Posts: 2024
Location: North Carolina

PostPosted: Mon Jan 28, 2013 6:44 am Reply with quote

Did you turn on error reporting to see if any errors were generated?

_________________
Tricked Out News 
View user's profile Send private message Send e-mail Visit poster's website
doffer83







PostPosted: Mon Jan 28, 2013 7:33 am Reply with quote

nuken, thank you for your respons...

You maybe don't believe it.. I paste the same code again and it just works fine

Code:
require_once(INCLUDE_PATH."includes/nukesentinel.php");


dame I spend hours just te move the site whith this huge database (11 year old).

I have installed 5 site phpnuke for friends and one for me (years ago) .. I am also the person who fix it when it needs.. but as I say it before from now on just ravennuke.. I am sick of phpnuke troubles and errors ..
( nothing works as it should be)

thank you again for the tip
 
nuken







PostPosted: Mon Jan 28, 2013 8:18 am Reply with quote

Cool. With the changes coming to php and mysql, phpnuke will need a lot of changes to work. You might want to practice upgrading those sites on a localhost to RavenNuke so you will be ready when the older code in nuke is not supported any more.
 
doffer83







PostPosted: Mon Jan 28, 2013 9:36 am Reply with quote

nuken, yes that's my goal


Blonde Moment

I still try on a local server Embarassed Very Happy
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> NukeSentinel(tm) v2.6.x

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 ©