Author |
Message |
skeen
Hangin' Around

Joined: Jul 17, 2003
Posts: 29
|
Posted:
Tue Dec 14, 2004 8:33 am |
|
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 |
|
|
|
 |
BobMarion
Former Admin in Good Standing

Joined: Oct 30, 2002
Posts: 1037
Location: RedNeck Land (known as Kentucky)
|
Posted:
Tue Dec 14, 2004 9:44 am |
|
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! |
|
|
 |
skeen

|
Posted:
Tue Dec 14, 2004 10:20 am |
|
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


Joined: Jun 04, 2004
Posts: 13
|
Posted:
Tue Dec 14, 2004 10:25 am |
|
|
|
 |
BobMarion

|
Posted:
Tue Dec 14, 2004 11:25 am |
|
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
|
Posted:
Tue Dec 14, 2004 12:22 pm |
|
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. |
|
|
|
 |
JRSweets
Worker


Joined: Aug 06, 2004
Posts: 192
|
Posted:
Tue Dec 14, 2004 3:13 pm |
|
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!) |
|
|
|
 |
skeen

|
Posted:
Tue Dec 14, 2004 5:30 pm |
|
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

|
Posted:
Tue Dec 14, 2004 5:59 pm |
|
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
|
Posted:
Tue Dec 14, 2004 8:43 pm |
|
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? |
|
|
|
 |
JRSweets

|
Posted:
Tue Dec 14, 2004 10:05 pm |
|
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


Joined: Jul 16, 2004
Posts: 3
|
Posted:
Tue Dec 14, 2004 11:52 pm |
|
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.
Hope this helps somebody. I turned them off for now until I can find out what is supposed to go in the list. |
|
|
|
 |
|