file_get_contents() and Apache crash

I was detecting crazy activity in my Apache 2.2 server running under Ubuntu 12.04 and PHP 5.3.

Yesterday I found the problem.

In the apache status page, I could see that there was a lot of activity initiated in my own server IP calling to a footer.html file. This file was configured as a destination in a PHP file that was supposed to fetch the html. But the html destination file to be loaded was not there any more, and the file_get_content() was returning an error:

file_get_contents failed to open stream

It was creating a sort of loop, I do not know why. I have googled it without much luck. It seems that when the function returned an error it would try again to fetch the file.

I could only fix it by changing the file and putting the correct route.

There must be something in the Apache behaviour that tells it to keep trying while there is a 404 error… I will keep investigating. If you have any idea about the true origin of the problem, please let me know.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s