FIle uploads: Empty _POST and _FILES arrays when file too large

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ian.H

    FIle uploads: Empty _POST and _FILES arrays when file too large

    Hi all,

    Uploading of files.. AFAIU from the manual, if a file is larger than the
    size defined in the form or larger than upload_max_file size in php.ini,
    that _FILES['file']['error'] should hold an INT error code.

    The file upload system is working fine if the file is smaller than the
    defined size, but if it's larger, then both the _POST and _FILES arrays
    are completely empty:


    array(0) {
    }


    I can obviously check to see if $_FILES is set and contains elements,
    but I was hoping for more specific error handling (reason as to why the
    upload failed).

    Has anyone else encountered this? Any info welcomed =)


    Specs:
    - FreeBSD
    - Apache 1.3.xx
    - PHP 4.3.2



    TIA.



    Regards,

    Ian

    --
    Ian.H
    digiServ Network
    London, UK

  • John Dunlop

    #2
    Re: FIle uploads: Empty _POST and _FILES arrays when file too large

    Ian.H wrote:

    [ ... ]
    [color=blue]
    > The file upload system is working fine if the file is smaller than the
    > defined size, but if it's larger, then both the _POST and _FILES arrays
    > are completely empty:[/color]

    What's post_max_size set to?

    [ ... ]

    --
    Jock

    Comment

    • Andy Hassall

      #3
      Re: FIle uploads: Empty _POST and _FILES arrays when file too large

      On Wed, 08 Sep 2004 20:51:31 GMT, Ian.H <ian@WINDOZEdig iserv.net> wrote:
      [color=blue]
      >Uploading of files.. AFAIU from the manual, if a file is larger than the
      >size defined in the form or larger than upload_max_file size in php.ini,
      >that _FILES['file']['error'] should hold an INT error code.
      >
      >Specs:
      > - FreeBSD
      > - Apache 1.3.xx
      > - PHP 4.3.2[/color]

      Have you checked bugs.php.net? Ironically, it appears to be down :-(

      --
      Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
      <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool

      Comment

      • Ian.H

        #4
        Re: FIle uploads: Empty _POST and _FILES arrays when file too large

        On Wed, 8 Sep 2004 22:21:16 +0100, John Dunlop
        <usenet+2004@jo hn.dunlop.name> wrote:
        [color=blue]
        >Ian.H wrote:
        >
        >[ ... ]
        >[color=green]
        >> The file upload system is working fine if the file is smaller than the
        >> defined size, but if it's larger, then both the _POST and _FILES arrays
        >> are completely empty:[/color]
        >
        >What's post_max_size set to?
        >
        >[ ... ][/color]



        45Mb.. 5Mb larger than max_upload_file size (only a personal dev server).

        It's also being uploaded for testing over a LAN connection and a 150Mb
        file takes maybe 10 seconds.. although I tried setting the timeout to 0
        too just to make sure that wasn't an issue, but had no useful results
        with that either.



        Regards,

        Ian

        --
        Ian.H
        digiServ Network
        London, UK

        Comment

        • Ian.H

          #5
          Re: FIle uploads: Empty _POST and _FILES arrays when file too large

          On Wed, 08 Sep 2004 23:09:22 +0100, Andy Hassall <andy@andyh.co. uk>
          wrote:
          [color=blue]
          >On Wed, 08 Sep 2004 20:51:31 GMT, Ian.H <ian@WINDOZEdig iserv.net> wrote:
          >[color=green]
          >>Uploading of files.. AFAIU from the manual, if a file is larger than the
          >>size defined in the form or larger than upload_max_file size in php.ini,
          >>that _FILES['file']['error'] should hold an INT error code.
          >>
          >>Specs:
          >> - FreeBSD
          >> - Apache 1.3.xx
          >> - PHP 4.3.2[/color]
          >
          > Have you checked bugs.php.net? Ironically, it appears to be down :-([/color]


          Heh, yup.. but found the same as you (seems DNS somewhere is the problem
          for me).

          I found a few things on google, one which lead to a "known bug" (albeit
          relating to PHP4.0) on bugs.php.net. A few others seem to have found the
          same according to google, but not come across a reason or a solution /
          workaround.



          Regards,

          Ian

          --
          Ian.H
          digiServ Network
          London, UK

          Comment

          Working...