473,406 Members | 2,371 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

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 3442
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Jim Michaels | last post by:
after a file upload, $_FILES is not populated but $_POST is. what's going on here? $_POST=C $_POST=C $_POST=C $_POST=C:\\www\\jimm\\images\\bg1.jpg $_FILES= $_FILES= $_FILES=
6
by: Vic Spainhower | last post by:
Hello, I am trying to do a FTP file upload which works fine on my localhost but on my ISP server it fails. I can't seem to find where I can go to find the specific cause of the failure. In both...
1
by: wbsurfver | last post by:
I'm trying to figure out why I can't upload a file in php. I'm trying it locally on a windows XP machine running Apache 2.2 and PHP 5.2.1. That is I am running the browser/server on same machine...
9
by: Jankie | last post by:
<?php if(isset($_POST) && $_FILES > 0){ foreach ($_FILES as $key => $error) { $name = $_FILES; $tempname = $_FILES; ………… ……… $path = 'uploads/'; include 'dbcon.php'; $rep = strpos($_FILES,...
3
by: macca | last post by:
Hi people! I'm having a problem with a file upload script that I'm writing. It works with Firefox but not Internet explorer. When the form is submitted(to it's self) it check for a file upload...
12
by: lawrence k | last post by:
I've a form that starts off like this: <form method="post" action="profile.php? id=5&formName=my_story_edit.htm" enctype="multipart/form-data"> <p>Email address:<br /> <input type="text"...
6
by: fpcreator2000 | last post by:
Hello everyone. I'm having problems with a page I've created that is used to insert data into a database. It uploads two files into two distinct folder, and it takes the filenames and inserts...
4
by: henribaeyens | last post by:
Hello, I have this question that hopefully some of you guys can answer. So I use the usual mechanism: display form, enter data, browse for file, validate, upload if no errors. Well, something...
9
by: Philth | last post by:
HI there, I had a similar problem yesterday with my delete function. All looks ok, yet doesn't delete. I've tried adding the '$_GET' to the sql query, without any success. Is this perhaps a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.