cftranslate
05-21-2004, 09:52 AM
I need to know if it is common for a host to deny increase in max_exec_time, the directive variable in php.ini that limits running time of a script.
Also there is an couple of php function that can be put in the script apparently to ignore the server directive for the containing script but the limit stays and the error occurs.
max_exec default time is 30 secs, not much for an upload script and a slow connection.
Thanks
Rich2k
05-21-2004, 11:37 AM
I think you'll find that the max execution time counter starts when the file has finished the upload process.
You need to worry about max upload size and max post size more.
jstanden
05-22-2004, 12:06 AM
From my experience, Rich is correct.
The max_exec_time tracks the amount of time PHP's internal functions are running -- loops, logic, memory addressing, ...
It doesn't count slow database queries or HTTP communication.
File uploads are part of an HTTP POST. PHP needs that information in the environment before it starts to run.
Thanks!
Burhan
05-22-2004, 04:17 AM
From http://www.php.net/manual/en/features.file-upload.php
The MAX_FILE_SIZE is advisory to the browser, although PHP also checks it. Changing this on the browser size is quite easy, so you can never rely on files with a greater size being blocked by this feature. The PHP-settings for maximum-size, however, cannot be fooled. You should add the MAX_FILE_SIZE form variable anyway as it saves users the trouble of waiting for a big file being transferred only to find that it was too big and the transfer actually failed.
And from http://www.php.net/manual/en/function.set-time-limit.php
Note: The set_time_limit() function and the configuration directive max_execution_time only affect the execution time of the script itself. Any time spent on activity that happens outside the execution of the script such as system calls using system(), stream operations, database queries, etc. is not included when determining the maximum time that the script has been running.
:)