View Full Version : Max exec time of 30 seconds exceeded

03-22-2004, 04:18 AM

Recently I installed PhpDig 1.8.0. However, as others in this forum I receive the following message:

Fatal error: Maximum execution time of 30 seconds exceeded in /xx/.../phpdig/admin/robot_functions.php on line nnn.

My host's config is Linux/Apache/PHP 4.3.2, safe_mode = on. I can't change that and I'm afraid they won't either.

Spidering seems to go well for most of the files, except for some large (450 kB) ones. In these cases the message appears. I already tried to spider the files separately, but to no avail.

I've read the other threads on this exec time subject, but it didn't clear the air for me.

Any suggestions on what may be the cause and, more importantly, how to resolve this?

Thanks, Peter.

03-23-2004, 12:30 AM
Hi. From php.net (http://www.php.net/manual/en/function.set-time-limit.php) is the following:

set_time_limit() has no effect when PHP is running in safe mode. There is no workaround other than turning off safe mode or changing the time limit in the php.ini.

For PhpDig to fully function, safe_mode should be set to no. However, you might find this (http://www.phpdig.net/showthread.php?threadid=221) thread useful.

03-23-2004, 03:04 AM
Hi Charter,

Thanks for the reply. I found the thread interesting, but it didn't help. Some additional information:

The largest file correctly spidered is 550 Kb. The file that is giving me trouble is not the largest one (420 Kb), but it does contain a lot of HTML tags, in particular internal links (links to named anchor). The fatal error always points to robot_functions.php line 141, where the tags are cleaned.

Any suggestion of how this process can be speeded up or what else I can do?


03-23-2004, 05:17 AM
Maybe this (http://www.phpdig.net/showthread.php?s=&threadid=653) thread will interest you.

03-23-2004, 07:11 AM
Thanks Konstantine, but that didn't help either.

However, I found a quick&dirty solution:

1. I temporarily removed all <A HREF ...> and <A NAME ...> tags from the file.
2. Replaced the original file with the adapted version.
3. Spidered the adapted version, which went great !!
4. Replaced the updated file with the original one.

It does work for me but, although the files on my site will change only every few weeks, I'm not looking forward to do this trick every time :mad:

So if anyone has an idea for a clean solution ....