You are here: Re: Execution timeout workaround in a 'safe' PHP environment « All PHP « IT news, forums, messages
Re: Execution timeout workaround in a 'safe' PHP environment

Posted by Hilarion on 09/05/05 21:34

>> When Apache is used as the webserver and you are allowed to use .htaccess
>> files, you might be able to override this restriction with such a file in
>> your webroot containing the following:
>>
>> <IfModule mod_php4.c>
>> php_value set_time_limit 60
>> </IfModule>
>>
>> When using PHP5 change mod_php4.c into mod_php5.c.
>
> That's an interesting solution - but I am on a commercial hosting
> system, where they won't allow any changes to the Apache or PHP
> configurarion :-(

Have you tried the solution? Are you sure they block .htaccess configuration
changes?


> I am already thinking I might have to limit the number of files in a
> batch to whatever I know will safely process in 30 seconds. :o(

You may also check inside the script after processing each one file
how much time you have left and make the script decide if it should
proceed to the next one. You should also store somewhere the information
that the file was processed immediately after finishing processing it,
so the next run will not repeat the allready done work.


Hilarion

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация