+ Reply to Thread
Results 1 to 3 of 3

Thread: PHP "max_input_time" and "handling file uploads"

  1. #1
    fomalhaut is offline x10Hosting Member fomalhaut is an unknown quantity at this point
    Join Date
    Aug 2009
    Location
    South of France near Arles
    Posts
    91

    PHP "max_input_time" and "handling file uploads"

    Hello all.

    That's a problem I have with another website that uses php (not in x10), but I've no doubts some of you know the answer:

    At my home, I've a poor very lent web connection, and at work, I've a very rapid web connection.

    I have to upload some files of about 150 Ko (the distant server doesn't accept file size more than 200 Ko). When I upload from my workplace, there is no problem. But when I upload from my home, there is often the message which indicates a too big file (that is not the reality). If then I go backwards and upload again the same file several times in a row (it can be 2, 3... 75 times !), the upload finally succeeds.

    I've seen in the php documentation, there is the max_input_time parameters, which is 60s by default, that could be the culprit:

    "The max_input_time sets the maximum time, in seconds, the script is allowed to receive input; this includes file uploads. For large or multiple files, or users on slower connections, the default of 60 seconds may be exceeded."
    And I suspect the script to give the same message (of too big file) whatever the error number.

    I also see in the php documentation for "handling file uploads" that the error code is "3" (i.e. "UPLOAD_ERR_PARTIAL") when "the uploaded file was only partially uploaded". Can it be the way in case of max_input_time overflow ?

    Thank you very much in advance for your answers.

  2. #2
    bhupendra2895's Avatar
    bhupendra2895 is offline x10 Elder bhupendra2895 is an unknown quantity at this point
    Join Date
    Jun 2010
    Location
    India
    Posts
    554

    Re: PHP "max_input_time" and "handling file uploads"

    I can't confirm that this 'big file size error' is due to max_input_time or not .Without looking at the source code of script, it is hard to tell.But If you can modify the script which handles the file upload put this php code on top of it.
    PHP Code:
    <?php
    $input_time
    =240;//your desired value
    ini_set('max_input_time',$input_time);
    echo 
    ini_get('max_input_time');//This will print the value of max_input_time so you will be able to know it is modified or not.
    ?>
    Also check if this problem exists with other browsers or not.
    Liked this? Click on the icon on the bottom of post to make me .

  3. #3
    fomalhaut is offline x10Hosting Member fomalhaut is an unknown quantity at this point
    Join Date
    Aug 2009
    Location
    South of France near Arles
    Posts
    91

    Re: PHP "max_input_time" and "handling file uploads"

    Sure, we can't know the real cause for this error without the code. I can't personaly modify, nor see it, but I will ask the guy on the server to add the code you give in his script. So we will know, and probably arranged the problem.

    Thank you very much.

    I've forgot: I've tried with other browsers: idem !
    Last edited by fomalhaut; 09-24-2010 at 02:23 PM.

+ Reply to Thread

Similar Threads

  1. Replies: 2
    Last Post: 08-05-2010, 01:22 PM
  2. Replies: 1
    Last Post: 05-08-2010, 03:17 AM
  3. Replies: 3
    Last Post: 05-05-2010, 08:59 PM
  4. Replies: 7
    Last Post: 10-01-2009, 05:16 PM
  5. Replies: 3
    Last Post: 11-28-2007, 05:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers