Forum Moderators: coopster
until last year, January 2007, I was running on my server the BASIC version of the Bad Bot Blocking Script, this one:
[webmasterworld.com...]
= $botblocker_time + $botblocker_itime*$botblocker_imaxvisit) { touch($botblocker_iplogdir.$botblocker_ipfile, $botblocker_time +
$botblocker_itime*($botblocker_imaxvisit-1) + $botblocker_ipenalty); header("HTTP/1.0 503 Service Temporarily Unavailable"); header("Connection:
close"); header("Content-Type: text/html"); echo "
Looks like you're trying to put our server under an heavy load. You can't do that!
"; echo "You are banned for $botblocker_ipenalty seconds."; $botblocker_fp = fopen($botblocker_iplogdir.$botblocker_iplogfile, "a"); if
($botblocker_fp) { $botblocker_useragent = ""; if (isset($_SERVER["HTTP_USER_AGENT"])) $botblocker_useragent = $_SERVER["HTTP_USER_AGENT"];
fputs($botblocker_fp, $_SERVER["REMOTE_ADDR"]." ".date("d/m/Y H:i:s")." ".$botblocker_useragent."\n"); fclose($botblocker_fp); } exit(); }
touch($botblocker_iplogdir.$botblocker_ipfile, $botblocker_newtime);?>
This basic version was doing a great job, but on January 2007 it just crashed my server, here's all details you may need:
My server it was, and still it is, a Blue Quartz, BQ-5102R-PHP-5.1.2.pkg, Apache/2.0.52 (CentOS).
One morning, back on january 2007, I did find all my Vsites screwed up and showing on top:
"Warning: touch() [function.touch]: Utime failed: Read-only file system in /home/.sites/254/site7/web/botblocker.php on line 31".
Appearantly it was a problem with the PHP "utime" function of the botblocker script and not a problem with the server itself.
And also: mail kernel journal commit I/O error.
It was like that botblocker script caused some corruption on my servers Hard Drive.
Later it appeared that the botblocker was placing the Drive into a Read only mode, which caused problems during the reboots that were needed to reset the server. The mail syslog file was unable to write to the drive, that's because the drive FAT table was hosed up.
So I had to take off the bot blocker script, and to migrate to a new server. More than one week to reinstall/upload everything!
The script itself was doing a great job, until killed the server, and I would like to ask your opinions and suggestions in order to reinstall this script in a way that will not cause such problems anymore.
I'm not a programmer and I hope that the infos I've turned to you may help you to understand/solve this issue I've had.
Thanks!
tito