Here's the thing.... The script is VERY long... However, this is the error_log that I receive:
[30-Dec-2007 17:06:20] PHP Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 4344 bytes) in /home/obedient/public_html/tools.php on line 98
[30-Dec-2007 18:48:51] PHP Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 38524561 bytes) in /home/obedient/public_html/tools.php on line 104
[30-Dec-2007 18:49:31] PHP Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 20624717 bytes) in /home/obedient/public_html/slap1.php on line 449
[30-Dec-2007 20:42:16] PHP Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 5496 bytes) in /home/obedient/public_html/tools.php on line 98
[30-Dec-2007 21:18:18] PHP Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 35986245 bytes) in /home/obedient/public_html/slap1.php on line 448
[30-Dec-2007 22:12:24] PHP Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 21827842 bytes) in /home/obedient/public_html/tools.php on line 104
[30-Dec-2007 22:33:55] PHP Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 15480501 bytes) in /home/obedient/public_html/slap1.php on line 449
[31-Dec-2007 00:13:16] PHP Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 18295605 bytes) in /home/obedient/public_html/slap1.php on line 449
[31-Dec-2007 01:50:22] PHP Fatal error: Allowed memory size of 41943040 bytes exhausted (tried to allocate 22195591 bytes) in /home/obedient/public_html/tools.php on line 104
And the code around that is
slap1.php around 449
reportDebugMessage("Length of Content When Beginning to Scrap " .strlen($content) . "\nLine: ". LINE . "File: " .FILE." Function: ". FUNCTION . "<br/>" );
$content = preg_replace("'<style[>]?>.?</style>'si",'',$content);
$content = preg_replace("'<script[>]?>.?</script>'si",'',$content);
$content = preg_replace("'<link[>]?>'si",'',$content);
$content = preg_replace("'<body[>]?>'si",'<body>',$content);
//echo "fetch: " . measuretime1() . "|";
tools.php around 104
$bufferar = explode ("\r\n\r\n", $buffer, 2);
//print_r ($bufferar);
//print_r ($bufferar);
My best guesses is that my program surf a web and then try to analyze the content. Once in a while it scanned a really large file.
That's all.
I wonder how to fix that?