Results 1 to 4 of 4
  1. #1

    how do common servers/programmers handle max_excution_time in upload scripts??

    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

  2. #2
    Join Date
    May 2002
    Location
    UK
    Posts
    2,994
    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.

  3. #3
    Join Date
    Aug 2001
    Location
    Orange County, CA
    Posts
    532
    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!
    Jeff Standen, Chief of R&D, WebGroup Media LLC. - LinkedIn
    Cerb is a fast and flexible web-based platform for business collaboration and automation. http://www.cerbweb.com/

  4. #4
    Join Date
    Jul 2003
    Location
    Kuwait
    Posts
    5,099
    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/functio...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.
    In order to understand recursion, one must first understand recursion.
    If you feel like it, you can read my blog
    Signal > Noise

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •