why would a large not upload, when a small does, when it is still within the POST limit?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • lawrence k

    why would a large not upload, when a small does, when it is still within the POST limit?

    I've a file upload script on my site. I just now used it to upload a
    small text document (10k). Everything worked fine.

    Then I tried to upload a 5.3 meg Quicktime video.

    Didn't work.

    I've set the POST limit in php.ini to 8 megs.

    What reasons, other than the POST limit, would a large upload fail?

  • Erwin Moller

    #2
    Re: why would a large not upload, when a small does, when it is still within the POST limit?

    lawrence k wrote:
    [color=blue]
    > I've a file upload script on my site. I just now used it to upload a
    > small text document (10k). Everything worked fine.
    >
    > Then I tried to upload a 5.3 meg Quicktime video.
    >
    > Didn't work.
    >
    > I've set the POST limit in php.ini to 8 megs.
    >
    > What reasons, other than the POST limit, would a large upload fail?[/color]

    Hi,

    Some possible problems:
    1) hidden input parameter in form: MAX_FILE_SIZE
    <input type="hidden" name="MAX_FILE_ SIZE" value="30000" />

    This is just a hint to the browser. If you do not use it, then don't worry.
    If you do, check the value.

    2) upload_max_file size in php.ini
    This directive also has influence on max size.

    and of course the POST-limit, but you found that one already.

    Check this out:


    It describes the whole process.

    Hope that helps.

    Regards,
    Erwin Moller

    Comment

    • lawrence k

      #3
      Re: why would a large not upload, when a small does, when it is still within the POST limit?


      lawrence k wrote:[color=blue]
      > I've a file upload script on my site. I just now used it to upload a
      > small text document (10k). Everything worked fine.
      >
      > Then I tried to upload a 5.3 meg Quicktime video.
      >
      > Didn't work.
      >
      > I've set the POST limit in php.ini to 8 megs.
      >
      > What reasons, other than the POST limit, would a large upload fail?[/color]

      Wow. Thanks to Steve, john.d.mann@sbc global.net, Geoff Muldoon and
      Erwin Moller for all the great replies. So, to summarize, these are the
      things I should check:

      1.) The binary file gets converted to ASCII, which will be bigger than
      the binary, so a 6 meg binary could potentially be bigger than the 8
      meg POST limit set in php.ini.

      2.) The script time-out limit. My long upload might be taking too
      long? I set the time out to 90 seconds in php.ini. Does that really
      cut off uploads? That doesn't make sense to me. Lots of people have the
      time out set to 30 seconds. For people on dial up modems, there would
      be no way to upload even moderate size files, if the time out kills the
      upload.

      3.) Also, if using PHP on Apache (I am) check that the httpd.conf
      settings aren't
      lower than your PHP settings.

      Thanks. I'll check these in order.

      Comment

      Working...