470,833 Members | 1,564 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,833 developers. It's quick & easy.

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_filesize 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
http://digiserv.net/
Jul 17 '05 #1
4 3338
Ian.H wrote:

[ ... ]
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:


What's post_max_size set to?

[ ... ]

--
Jock
Jul 17 '05 #2
On Wed, 08 Sep 2004 20:51:31 GMT, Ian.H <ia*@WINDOZEdigiserv.net> wrote:
Uploading of files.. AFAIU from the manual, if a file is larger than the
size defined in the form or larger than upload_max_filesize in php.ini,
that _FILES['file']['error'] should hold an INT error code.

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


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

--
Andy Hassall / <an**@andyh.co.uk> / <http://www.andyh.co.uk>
<http://www.andyhsoftware.co.uk/space> Space: disk usage analysis tool
Jul 17 '05 #3
On Wed, 8 Sep 2004 22:21:16 +0100, John Dunlop
<us*********@john.dunlop.name> wrote:
Ian.H wrote:

[ ... ]
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:


What's post_max_size set to?

[ ... ]


45Mb.. 5Mb larger than max_upload_filesize (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
http://digiserv.net/
Jul 17 '05 #4
On Wed, 08 Sep 2004 23:09:22 +0100, Andy Hassall <an**@andyh.co.uk>
wrote:
On Wed, 08 Sep 2004 20:51:31 GMT, Ian.H <ia*@WINDOZEdigiserv.net> wrote:
Uploading of files.. AFAIU from the manual, if a file is larger than the
size defined in the form or larger than upload_max_filesize in php.ini,
that _FILES['file']['error'] should hold an INT error code.

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


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

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
http://digiserv.net/
Jul 17 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Jim Michaels | last post: by
6 posts views Thread by Vic Spainhower | last post: by
1 post views Thread by wbsurfver | last post: by
4 posts views Thread by henribaeyens | last post: by
9 posts views Thread by Philth | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.