I have a form with 75 or so file input controls:
Usually when I submit the form, I only upload two or so files. So in the
post request, it sends the two files along with the other blank 73
fields. This has been working fine on my live and test servers so far.
However as of the past few days only the first 20 file fields are
recieved on the live server. I saw this by dumping the $_FILES array.
This does not happen on the test server. I can see all 75 file fields
been sent across in the POST header in wireshark, but but only the first
20 appear in the $_FILES array.
Has anyone come across this problem of the $_FILE array being truncated?
I don't recall changing anything on the live server.
Richard
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: $_FILE array being truncated
am 16.03.2010 18:25:23 von Daniel Egeberg
On Tue, Mar 16, 2010 at 15:19, Richard H Lee wrote:
> p.general,
>
> I have a form with 75 or so file input controls:
>
> Usually when I submit the form, I only upload two or so files. So in the
> post request, it sends the two files along with the other blank 73 fields.
> This has been working fine on my live and test servers so far.
>
> However as of the past few days only the first 20 file fields are recieved
> on the live server. I saw this by dumping the $_FILES array. This does not
> happen on the test server. I can see all 75 file fields been sent across in
> the POST header in wireshark, but but only the first 20 appear in the
> $_FILES array.
>
> Has anyone come across this problem of the $_FILE array being truncated? I
> don't recall changing anything on the live server.
>
> Richard
Check out max_file_uploads which was added in PHP 5.2.12 and defaults to 20.
--
Daniel Egeberg
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Tue, 2010-03-16 at 18:25 +0100, Daniel Egeberg wrote:
> On Tue, Mar 16, 2010 at 15:19, Richard H Lee wrote:
> > p.general,
> >
> > I have a form with 75 or so file input controls:
> >
> > Usually when I submit the form, I only upload two or so files. So in the
> > post request, it sends the two files along with the other blank 73 fields.
> > This has been working fine on my live and test servers so far.
> >
> > However as of the past few days only the first 20 file fields are recieved
> > on the live server. I saw this by dumping the $_FILES array. This does not
> > happen on the test server. I can see all 75 file fields been sent across in
> > the POST header in wireshark, but but only the first 20 appear in the
> > $_FILES array.
> >
> > Has anyone come across this problem of the $_FILE array being truncated? I
> > don't recall changing anything on the live server.
> >
> > Richard
>
> Check out max_file_uploads which was added in PHP 5.2.12 and defaults to 20.
>
> --
> Daniel Egeberg
>
I really wouldn't rely on a form that contains more than 20 file upload
boxes though. If someone uploads some large files, they're stuck with an
extremely long wait which will slow down your server a bit as well if a
lot of people are using the same form at the same time.
Have you looked at using a multi-file upload element instead?
Thanks,
Ash
http://www.ashleysheridan.co.uk
--=-hXW/GRM4vb+8XgCpR7zP--
RE: $_FILE array being truncated
am 16.03.2010 18:37:01 von Richard H Lee
> Check out max_file_uploads which was added in PHP 5.2.12 and defaults
to
> 20.
Yes that was the problem, I set max_file_uploads higher and it works
now.
Thanks
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: $_FILE array being truncated
am 16.03.2010 19:53:40 von Kim Madsen
Ashley Sheridan wrote on 16/03/2010 18:28:
> I really wouldn't rely on a form that contains more than 20 file upload
> boxes though. If someone uploads some large files, they're stuck with an
> extremely long wait which will slow down your server a bit as well if a
> lot of people are using the same form at the same time.
True. Instead make the upload with AJAX, so the file starts uploading
when the field is changed (onChange()) or out of focus (is there such a
function? onUnFocus()? :-)). See gmail attachment for an example.
--
Kind regards
Kim Emax - masterminds.dk
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Re: $_FILE array being truncated
am 16.03.2010 23:26:03 von Rene Veerman
jumploader.com might be interesting to you..
On Tue, Mar 16, 2010 at 3:19 PM, Richard H Lee wrote:
> p.general,
>
> I have a form with 75 or so file input controls:
>
> Usually when I submit the form, I only upload two or so files. So in the
> post request, it sends the two files along with the other blank 73 fields.
> This has been working fine on my live and test servers so far.
>
> However as of the past few days only the first 20 file fields are recieved
> on the live server. I saw this by dumping the $_FILES array. This does not
> happen on the test server. I can see all 75 file fields been sent across in
> the POST header in wireshark, but but only the first 20 appear in the
> $_FILES array.
>
> Has anyone come across this problem of the $_FILE array being truncated? I
> don't recall changing anything on the live server.
>
> Richard
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
RE: $_FILE array being truncated
am 17.03.2010 16:52:34 von M.Ford
> -----Original Message-----
> From: Kim Madsen [mailto:php.net@emax.dk]
> Sent: 16 March 2010 18:54
> when the field is changed (onChange()) or out of focus (is there
> such a
> function? onUnFocus()? :-)).=20
onBlur()
(Keeping the A as short as the Q is OT!)
Cheers!
Mike
--=20
Mike Ford,
Electronic Information Developer, Libraries and Learning Innovation,
Leeds Metropolitan University, C507, Civic Quarter Campus,=20
Woodhouse Lane, LEEDS,=A0 LS1 3HE,=A0 United Kingdom=20
Email: m.ford@leedsmet.ac.uk=20
Tel: +44 113 812 4730
To view the terms under which this email is distributed, please go to http:=
//disclaimer.leedsmet.ac.uk/email.htm
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php