んじゃ、とりあえずヒントで。
セーフモード
http://www.php.net/manual/ja/features.safe-mode.php

set_time_limit
http://www.php.net/manual/ja/function.set-time-limit.php