Php crashing apache without error message.
Posted: Mon Sep 21, 2009 8:31 pm
Hello, My first time posting here so if I do something wrong please let me know.
I've been running apache for a few months now.
here is my setup for my development box.
Windows Vista basic 64bit quad core
Apache/2.2.13 (Win32)
-PHP/5.3.0
I've haven't had any problems developing scripts for my websites but I've come
across a very serious error I can't resolve.
I have been searching forums and post and sites without finding anything useful
so after 3 days I've decided to post about it.
This code causes apache to crash on both my development box and my public webserver.
My development box is windows bases, the public server is linux based.
My Web host is tired of restarting apache every time I call and has offered NO help with
this issue.
here is the code, please let me know if you see anything wrong with it.
I might just be missing something.
This is just the start of a new script i'm working on. I entered this and then tested the script
to ensure I had not made any errors. Then apache crashed.
I've been running apache for a few months now.
here is my setup for my development box.
Windows Vista basic 64bit quad core
Apache/2.2.13 (Win32)
-PHP/5.3.0
I've haven't had any problems developing scripts for my websites but I've come
across a very serious error I can't resolve.
I have been searching forums and post and sites without finding anything useful
so after 3 days I've decided to post about it.
This code causes apache to crash on both my development box and my public webserver.
My development box is windows bases, the public server is linux based.
My Web host is tired of restarting apache every time I call and has offered NO help with
this issue.
here is the code, please let me know if you see anything wrong with it.
I might just be missing something.
This is just the start of a new script i'm working on. I entered this and then tested the script
to ensure I had not made any errors. Then apache crashed.
Code: Select all
<?php
//Options for 404.php autoban script
$banfile = 'Banlist.txt';
$htaccess_file = '.htaccess';
$attempts = 10;
$fp = fopen($banfile, 'r');
while (!feof($fp)) {
$line = trim(fgets($fp));
$pieces = explode("\t", $line);
$client = trim($pieces[0]);
$count = trim($pieces[1]);
$error_count[$client] = $count;
}
fclose($fp);
?>