RE: [PHP] $_FILE array being truncated

2010-03-17 Thread Ford, Mike
> -Original Message-
> From: Kim Madsen [mailto:php@emax.dk]
> Sent: 16 March 2010 18:54

> when the field is changed (onChange()) or out of focus (is there
> such a
> function? onUnFocus()? :-)). 

onBlur()

(Keeping the A as short as the Q is OT!)

Cheers!

Mike
 -- 
Mike Ford,
Electronic Information Developer, Libraries and Learning Innovation,  
Leeds Metropolitan University, C507, Civic Quarter Campus, 
Woodhouse Lane, LEEDS,  LS1 3HE,  United Kingdom 
Email: m.f...@leedsmet.ac.uk 
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



Re: [PHP] $_FILE array being truncated

2010-03-16 Thread 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: [PHP] $_FILE array being truncated

2010-03-16 Thread 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: [PHP] $_FILE array being truncated

2010-03-16 Thread Richard 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: [PHP] $_FILE array being truncated

2010-03-16 Thread Ashley Sheridan
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




Re: [PHP] $_FILE array being truncated

2010-03-16 Thread 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



[PHP] $_FILE array being truncated

2010-03-16 Thread Richard H Lee

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



Re: [PHP] $_FILE[user][error] = 6 ?

2004-12-30 Thread Al
You nailed it Curt.
Virtual Host "Powweb" removed the system default tmp directory without telling 
anyone.  All file uploading services were broken.

I fixed the problem in php.ini
Thanks everyone.

Curt Zirzow wrote:
* Thus wrote Al:
What is a $_FILE[user][error]=> 6
I can't find Error level 6 in the manual or on Google.
Here is my files array:
[userfile] => Array
   (
   [name] => Readme.txt
   [type] =>
   [tmp_name] =>
   [error] => 6
   [size] => 0
   )
Doesn't make sense.  Readme.txt is simply a small text file on my local HD.

6 == Missing /tmp or similar directory. 

Which means that your php.ini's upload_tmp_dir isn't set properly.
Curt
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] $_FILE[user][error] = 6 ?

2004-12-29 Thread Curt Zirzow
* Thus wrote Greg Donald:
> > What is a $_FILE[user][error]=> 6
> 
> It appears undefined per the manual:
> 
> http://www.php.net/manual/en/features.file-upload.errors.php

It will show up shortly, the entry will be something like:

UPLOAD_ERR_NO_TMP_DIR

  Value: 6; Missing a temporary folder. Introduced in PHP 4.3.10 and PHP
  5.0.3.


Curt
-- 
Quoth the Raven, "Nevermore."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] $_FILE[user][error] = 6 ?

2004-12-29 Thread Curt Zirzow
* Thus wrote Al:
> What is a $_FILE[user][error]=> 6
> 
> I can't find Error level 6 in the manual or on Google.
> 
> Here is my files array:
> 
> [userfile] => Array
> (
> [name] => Readme.txt
> [type] =>
> [tmp_name] =>
> [error] => 6
> [size] => 0
> )
> 
> Doesn't make sense.  Readme.txt is simply a small text file on my local HD.

6 == Missing /tmp or similar directory. 

Which means that your php.ini's upload_tmp_dir isn't set properly.


Curt
-- 
Quoth the Raven, "Nevermore."

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] $_FILE[user][error] = 6 ?

2004-12-29 Thread Greg Donald
> What is a $_FILE[user][error]=> 6

It appears undefined per the manual:

http://www.php.net/manual/en/features.file-upload.errors.php


-- 
Greg Donald
Zend Certified Engineer
http://gdconsultants.com/
http://destiney.com/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] $_FILE[user][error] = 6 ?

2004-12-29 Thread Christopher Fulton
It may help to know what your form looks like.  Does your form have
the hidden MAX_FILE_SIZE variable before the file field?  Also, what
version of PHP are you running?

Anyways, just some suggestions.
-Chris


On Tue, 28 Dec 2004 15:18:16 -0500, Al <[EMAIL PROTECTED]> wrote:
> I keyed "$_FILE[user][error]" from memory, and it's wrong.  It really is 
> "userfile";
> 
> Weird problem, eh!
> 
> Sebastian wrote:
> > not sure if its a typo but the array shows "userfile" and your variable
> > array shows "user"
> > it looks like the file isn't being passed at all, double check if you have
> > any typos..  type is blank which should at least show the mime type..
> >
> > - Original Message -----
> > From: "Al" <[EMAIL PROTECTED]>
> > To: 
> > Sent: Tuesday, December 28, 2004 2:51 PM
> > Subject: Re: [PHP] $_FILE[user][error] = 6 ?
> >
> >
> >
> >>Doesn't work on any file type.
> >>
> >>I've checked the usual suspects. e.g.
> >> URL is
> >
> > my
> >
> >>php file.
> >>
> >>On Wednesday 29 December 2004 01:40, Al wrote:
> >>
> >>What is a $_FILE[user][error]=> 6
> >>
> >>I can't find Error level 6 in the manual or on Google.
> >>
> >>Here is my files array:
> >>
> >>[userfile] => Array
> >>(
> >> [name] => Readme.txt
> >> [type] =>
> >> [tmp_name] =>
> >> [error] => 6
> >> [size] => 0
> >> )
> >>
> >>Doesn't make sense.  Readme.txt is simply a small text file on my local
> >
> > HD.
> 
> --
> 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: [PHP] $_FILE[user][error] = 6 ?

2004-12-28 Thread Al
I keyed "$_FILE[user][error]" from memory, and it's wrong.  It really is 
"userfile";
Weird problem, eh!
Sebastian wrote:
not sure if its a typo but the array shows "userfile" and your variable
array shows "user"
it looks like the file isn't being passed at all, double check if you have
any typos..  type is blank which should at least show the mime type..
- Original Message - 
From: "Al" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, December 28, 2004 2:51 PM
Subject: Re: [PHP] $_FILE[user][error] = 6 ?


Doesn't work on any file type.
I've checked the usual suspects. e.g.
 URL is
my
php file.
On Wednesday 29 December 2004 01:40, Al wrote:
What is a $_FILE[user][error]=> 6
I can't find Error level 6 in the manual or on Google.
Here is my files array:
[userfile] => Array
   (
[name] => Readme.txt
[type] =>
[tmp_name] =>
[error] => 6
[size] => 0
)
Doesn't make sense.  Readme.txt is simply a small text file on my local
HD.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] $_FILE[user][error] = 6 ?

2004-12-28 Thread Matt M.
is 
what comes out in the html or is it ?

can you upload any files at all?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] $_FILE[user][error] = 6 ?

2004-12-28 Thread Sebastian
not sure if its a typo but the array shows "userfile" and your variable
array shows "user"
it looks like the file isn't being passed at all, double check if you have
any typos..  type is blank which should at least show the mime type..

- Original Message - 
From: "Al" <[EMAIL PROTECTED]>
To: 
Sent: Tuesday, December 28, 2004 2:51 PM
Subject: Re: [PHP] $_FILE[user][error] = 6 ?


> Doesn't work on any file type.
>
> I've checked the usual suspects. e.g.
>  URL is
my
> php file.
>
> On Wednesday 29 December 2004 01:40, Al wrote:
>
> What is a $_FILE[user][error]=> 6
>
>I can't find Error level 6 in the manual or on Google.
>
>Here is my files array:
>
>[userfile] => Array
> (
>  [name] => Readme.txt
>  [type] =>
>  [tmp_name] =>
>  [error] => 6
>  [size] => 0
>  )
>
> Doesn't make sense.  Readme.txt is simply a small text file on my local
HD.

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP] $_FILE[user][error] = 6 ?

2004-12-28 Thread Al
Doesn't work on any file type.
I've checked the usual suspects. e.g.
 URL is my 
php file.

Jason Wong wrote:
On Wednesday 29 December 2004 01:40, Al wrote:
What is a $_FILE[user][error]=> 6
I can't find Error level 6 in the manual or on Google.
Here is my files array:
[userfile] => Array
(
[name] => Readme.txt
[type] =>
[tmp_name] =>
[error] => 6
[size] => 0
)
Doesn't make sense.  Readme.txt is simply a small text file on my local HD.
Note, type doesn't register either.

Does upload work at all, or does it only fail for that particular file? 

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] $_FILE[user][error] = 6 ?

2004-12-28 Thread Jason Wong
On Wednesday 29 December 2004 01:40, Al wrote:
> What is a $_FILE[user][error]=> 6
>
> I can't find Error level 6 in the manual or on Google.
>
> Here is my files array:
>
> [userfile] => Array
>  (
>  [name] => Readme.txt
>  [type] =>
>  [tmp_name] =>
>  [error] => 6
>  [size] => 0
>  )
>
> Doesn't make sense.  Readme.txt is simply a small text file on my local HD.
>
> Note, type doesn't register either.

Does upload work at all, or does it only fail for that particular file? 

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *
--
Search the list archives before you post
http://marc.theaimsgroup.com/?l=php-general
--
/*
Sometime in 1993 NANCY SINATRA will lead a BLOODLESS COUP on GUAM!!
*/

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[PHP] $_FILE[user][error] = 6 ?

2004-12-28 Thread Al
What is a $_FILE[user][error]=> 6
I can't find Error level 6 in the manual or on Google.
Here is my files array:
[userfile] => Array
(
[name] => Readme.txt
[type] =>
[tmp_name] =>
[error] => 6
[size] => 0
)
Doesn't make sense.  Readme.txt is simply a small text file on my local HD.
Note, type doesn't register either.
Weird.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] $_FILE

2004-03-16 Thread Bruno Santos
Hello.

   I've read in a book that we can access several file properties (when 
uploading a file) in two ways:

1st with the array $_FILE
2nd with $HTTP_POST_FILES
i've used the 1st, but my program give many erros, and when using the 
2nd, everything was fine.

the 1st is avaiable from PHP 4.1.0, and im using PHP 4.3.4.
Can someone tell me why does not work ???
cheers

--
-
   .-'-.
.' `.
   : :
  :   :
  :  _/|  :   Bruno Santos
   :   =/_/  : [EMAIL PROTECTED]
`._/ | .'
 (   /  ,|...-'Pagina Pessoal
  \_/^\/||__   http://feiticeir0.no-ip.org
   _/~  `""~`"` \_
__/  -'/  `-._ `\_\__
  /jgs  /-'`  `\   \  \-.\
  "Written very small on the back poket of a girl's jeans
  - 'If you can read this, you're WAY too close.'"
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php