|
Posted by Alvaro G Vicario on 08/24/05 15:05
*** alex wrote/escribió (Tue, 23 Aug 2005 14:45:46 +0200):
> I've got a problem with a script that needs about 1 minute to run as the
> max_execution_time is set to 30 seconds only. I don't have the rights to
> modify the max_execution_time parameter on the server.
You may find this useful, if you're allowed to use it:
<?
ini_set('max_execution_time', 120); // 120 seconds
ini_set('memory_limit', '64M'); // 64 MB
?>
In either case, I highly recommend that you optimize your script. If it's a
database query, skip fields you don't need, limit returned rows to needed
records, use indexes, avoid unnecessary sortings... That can make as much
difference as going from 1 minute to 10 seconds.
--
-- Álvaro G. Vicario - Burgos, Spain
-- http://bits.demogracia.com - Mi sitio sobre programación web
-- Don't e-mail me your questions, post them to the group
--
[Back to original message]
|