When I address a PHP file, I always get an error 500. I've looked up the logs of my Apache server, and this displays that some includes etc. in the PHP file address files which don't exist on the server. They don't exist because I'm just testing my PHP file. But could it be achieved that the server runs the php file in every case, even when something is wrong?

Every 30 seconds an entry is made in the error_log file which says [Sat Jun 09 17:55:07 2012] [error] [client] File does not exist: /var/www/html/index.html ... but there IS an index.html?!

1 Answer 1


The server is running the PHP file.

Execution of the PHP is stopping when it can't load something it's including. If you get it to ignore those errors, it'll simply error later on in execution, when it actually tries to use what it tried to load with the include.

If you don't actually need what the include statements are loading, then remove them from your code.

  • ok, thanks, seems legit. it seems that just the line require_once("blub.php") makes the error. after deleting it everything works fine. do you know something about my PS-question? Jun 9, 2012 at 18:07
  • Does that file exist at that exact location? What do you get from ls -l /var/www/html/? Jun 9, 2012 at 18:09
  • yes, it does. your command displays -rwxr-xr-x 1 ec2-user ec2-user 6228 9. Jun 18:00 index.html (and the other files and folder) Jun 9, 2012 at 18:23
  • That error is timestamped as 5 minutes before the file's modify timestamp - the file probably did not exist at the time the error occured. Jun 9, 2012 at 18:24
  • ok. i've looked up into the error_log file again... i think you're right because it now don't complains that the index.html is missing, but now every 3 (!) seconds an entry is made with /var/www/html/merlin-check is missing?! Jun 9, 2012 at 18:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .