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™ Bug Reports
Author Message
skeen
Hangin' Around


Joined: Jul 17, 2003
Posts: 29

PostPosted: Tue Dec 14, 2004 8:33 am Reply with quote

I have installed 2.12 and now I get this error

Warning: stristr(): Empty delimiter. in /www/www.mydomain.com/htdocs/includes/sentinel.php on line 269

Warning: stristr(): Empty delimiter. in /www/www.mydomain.com/htdocs/includes/sentinel.php on line 283

help appreciated
 
View user's profile Send private message
BobMarion
Former Admin in Good Standing


Joined: Oct 30, 2002
Posts: 1037
Location: RedNeck Land (known as Kentucky)

PostPosted: Tue Dec 14, 2004 9:44 am Reply with quote

You have activated the "Harvester" and "String" blockers without having anything in their text boxes to compare against. or you have a blank line in the text boxes.

_________________
Bob Marion
Codito Ergo Sum
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Send e-mail Visit poster's website
skeen
PostPosted: Tue Dec 14, 2004 10:20 am Reply with quote

Ok so i went to turn them off and now i get this

Warning: stristr(): Empty delimiter. in /www/www.mysite.com/htdocs/includes/sentinel.php on line 283

Warning: Cannot modify header information - headers already sent by (output started at /www/www.mysite.com/htdocs/includes/sentinel.php:283) in /www/www.mysite.com/htdocs/admin/modules/sentinel/ABConfigSave.php on line 22
 
anthonyaykut
New Member
New Member


Joined: Jun 04, 2004
Posts: 13

PostPosted: Tue Dec 14, 2004 10:25 am Reply with quote

Same probs here!
 
View user's profile Send private message
BobMarion
PostPosted: Tue Dec 14, 2004 11:25 am Reply with quote

At ChatServ's suggestion try replacing the stristr with stripos in these routines like so:Current routines:
Code:
// Check for Referer

$blocker_row = $arrayreferer;
if($blocker_row['activate'] > 0) {

  $RefererList = explode("\r\n",$blocker_row['list']);
  $streferer = get_referer();
  for ($i=0; $i < count($RefererList); $i++) {
    $refered = $RefererList[$i];
    if (stristr($streferer, "$refered") AND $refered != "") {
      $abmatch = $refered;
      block_ip($ip, $banuser, $bantime, $blocker_row, $abmatch);
    }
  }
}

// Check for Harvester
$blocker_row = $arrayharvester;
if($blocker_row['activate'] > 0) {

  $HarvestList = explode("\r\n",$blocker_row['list']);
  $agent = get_user_agent();
  for ($i=0; $i < count($HarvestList); $i++) {
    $harvest = $HarvestList[$i];
    if (stristr($agent, "$harvest") AND $harvest != "") {
      $abmatch = $harvest;
      block_ip($ip, $banuser, $bantime, $blocker_row, $abmatch);
    }
  }
}

// Check for Strings
$blocker_row = $arraystring;
if($blocker_row['activate'] > 0) {

  $StringList = explode("\r\n",$blocker_row['list']);
  for ($i=0; $i < count($StringList); $i++) {
    $stringl = $StringList[$i];
    if (stristr($querystring, "$stringl") AND $stringl != "") {
      $abmatch = $stringl;
      block_ip($ip, $banuser, $bantime, $blocker_row, $abmatch);
    }
  }
}

// Check for Request
$blocker_row = $arrayrequest;
if($blocker_row['activate'] > 0) {

  $RequestList = explode("\r\n",$blocker_row['list']);
  $method = get_request_method();
  for ($i=0; $i < count($RequestList); $i++) {
    $request = $RequestList[$i];
    if (stristr($method, "$request") AND $request != "") {
      $abmatch = $request;
      block_ip($ip, $banuser, $bantime, $blocker_row, $abmatch);
    }
  }
}


Replacements:
Code:
// Check for Referer

$blocker_row = $arrayreferer;
if($blocker_row['activate'] > 0) {

  $RefererList = explode("\r\n",$blocker_row['list']);
  $streferer = get_referer();
  for ($i=0; $i < count($RefererList); $i++) {
    $refered = $RefererList[$i];
    if (stripos($streferer, "$refered") AND $refered != "") {
      $abmatch = $refered;
      block_ip($ip, $banuser, $bantime, $blocker_row, $abmatch);
    }
  }
}

// Check for Harvester
$blocker_row = $arrayharvester;
if($blocker_row['activate'] > 0) {

  $HarvestList = explode("\r\n",$blocker_row['list']);
  $agent = get_user_agent();
  for ($i=0; $i < count($HarvestList); $i++) {
    $harvest = $HarvestList[$i];
    if (stripos($agent, "$harvest") AND $harvest != "") {
      $abmatch = $harvest;
      block_ip($ip, $banuser, $bantime, $blocker_row, $abmatch);
    }
  }
}

// Check for Strings
$blocker_row = $arraystring;
if($blocker_row['activate'] > 0) {

  $StringList = explode("\r\n",$blocker_row['list']);
  for ($i=0; $i < count($StringList); $i++) {
    $stringl = $StringList[$i];
    if (stripos($querystring, "$stringl") AND $stringl != "") {
      $abmatch = $stringl;
      block_ip($ip, $banuser, $bantime, $blocker_row, $abmatch);
    }
  }
}

// Check for Request
$blocker_row = $arrayrequest;
if($blocker_row['activate'] > 0) {

  $RequestList = explode("\r\n",$blocker_row['list']);
  $method = get_request_method();
  for ($i=0; $i < count($RequestList); $i++) {
    $request = $RequestList[$i];
    if (stripos($method, "$request") AND $request != "") {
      $abmatch = $request;
      block_ip($ip, $banuser, $bantime, $blocker_row, $abmatch);
    }
  }
}
 
chatserv
Member Emeritus


Joined: May 02, 2003
Posts: 1389
Location: Puerto Rico

PostPosted: Tue Dec 14, 2004 12:22 pm Reply with quote

Assuming it works there's one thing to consider, to my understanding stripos is a php 5 function, if yours is older maybe you can use the stripos_clone function from Nuke Patched.
 
View user's profile Send private message Visit poster's website
JRSweets
Worker
Worker


Joined: Aug 06, 2004
Posts: 192

PostPosted: Tue Dec 14, 2004 3:13 pm Reply with quote

I tried stripos and got a error for an undefined function. I tried stripos_clone and still got the white page. The only thing that worked was using the functions from 2.1.1

(Sidenote: I appears this has really worked at making my site load faster, and cut the query down by about 20-30. Good job!)
 
View user's profile Send private message
skeen
PostPosted: Tue Dec 14, 2004 5:30 pm Reply with quote

what is interesting is I only upgraded from 2.1.1 to 2.1.2 with the same settings so why the errors now and not before ?
 
skeen
PostPosted: Tue Dec 14, 2004 5:59 pm Reply with quote

Ok i totally removed Sentinal and reinstalled from scratch, it works fine now.

Must be some incompatability in 2.1.1 data that 2.1.2 doesnt like.
 
echo
Hangin' Around


Joined: Nov 27, 2003
Posts: 37

PostPosted: Tue Dec 14, 2004 8:43 pm Reply with quote

I just installed NukeSentinel_760_212 on a fresh 7.6 Patched 2.8 install and am getting these errors also.
I uninstalled the db tables and reinstalled all files and tables twice with the same results.

BobMarion wrote:
You have activated the "Harvester" and "String" blockers without having anything in their text boxes to compare against. or you have a blank line in the text boxes.


Am I suppose to manually insert something?
 
View user's profile Send private message
JRSweets
PostPosted: Tue Dec 14, 2004 10:05 pm Reply with quote

Take the functions that Bob listed above from the nuke sentinel 2.1.1 version, and everything should work that is what I did. They are in the includes/sentinel.php file.
 
ChrisRPG
New Member
New Member


Joined: Jul 16, 2004
Posts: 3

PostPosted: Tue Dec 14, 2004 11:52 pm Reply with quote

I did some more investigating. After I reinstalled sentinel and thought everything was fine, I had to set up the settings again. I found out the request and string lists were the problem. When I turned on request without putting anything in the list for the last option in that submenu I got this error on every page - Warning: stristr(): Empty delimiter. in /www/yoursite/public_html/includes/sentinel.php on line 298. When I turned on the string blocker with an emtpy list I got on every page this error - Warning: stristr(): Empty delimiter. in /www/yoursite/public_html/includes/sentinel.php on line 298.
Obviously I changed my site name to yoursite and the www was something else, but you get the idea. Wink
Hope this helps somebody. I turned them off for now until I can find out what is supposed to go in the list.
 
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™ 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 ©