Page 1 of 1

Fatal error: Maximum execution time of 30 seconds exceeded

PostPosted: 11. October 2012 05:59
by Echo89
XAMPP Version: 1.8.1
Control panel version: 3.1.0
Windows version: Windows XP Pro

Problem:

Well, this morning I went to continue with my ventures with PHP, and index.php just would not load, so I decided to leave it. Then it gave this error. Apparently on this line:

Code: Select all
if(!defined("INCLUDE"))


Which is very odd, all it does if it is not defined is:

Code: Select all
die("You cannot access this file directly.");


And very rarely, it will load, but it takes AGES! I have restarted Apache, MySQL (And my computer) many times to no avail. But the strange thing is, it was working last night, and I have changed nothing overnight.

There are no errors in the Apache error log that would indicate why this is happening.

Thanks in advance!

Re: Fatal error: Maximum execution time of 30 seconds exceed

PostPosted: 14. October 2012 21:47
by Echo89
Anybody?

Re: Fatal error: Maximum execution time of 30 seconds exceed

PostPosted: 14. October 2012 22:01
by Altrea
Hi Echo89 (there is ALWAYS time for a short salutation, especially if you are asking for help on a community board. It's a matter of politeness),

If i make a file with just this contents
Code: Select all
<?php
define("INCLUDE", "Test");
if(!defined("INCLUDE"))
   die("You cannot access this file directly.");
echo "Success";


it runs very well with and without the define().
So the reason must be somewhere else.
But noone can know exept the one who knows everything about the script.

best wishes,
Altrea

Re: Fatal error: Maximum execution time of 30 seconds exceed

PostPosted: 17. October 2012 22:59
by Echo89
But the thing is it was working and then it wasn't, I had changed nothing.