Re: Another odd file problem / Limit on File uploads?

From: Date: Tue, 15 Oct 2002 19:21:43 +0000
Subject: Re: Another odd file problem / Limit on File uploads?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-120065@lists.php.net to get a copy of this message
Can't anyone help me with this? :-/ Read below... I wrote:
Hey yet again... I've got a 3x3 grid of type 'file' input elements, for a nifty total of 9 upload spaces.. After specifying a file in all 9, and attempting upload, I only got 5.. I noticed the total filesize was 2 megs, so I changed the php.ini to 8.. yet I still got that problem. So I checked how my file array was being posted, and it turns out only 5 of them go through! Hopefully someone can follow this particular code... In the HTML Form, we have: Include Include ..... Include (The picInc array just allows them to set whether or not they really want that picture included (in case they mess up and don't want to upload such a pic - I wouldn't expect some of the users to be savvy enough to know to just delete the text from the field)) In the PHP upload, to check to see which elements are being parsed, I have: $current = 0; while (list($key) = each($_FILES['picname'])) { echo $current; /* -- This is the normal code just to satisfy everyone's curiosity. if ($picInc[$current] == true) {
    if (!is_dir($dir))
      mkdir($dir);
    if (!is_uploaded_file ($_FILES['picname']['tmp_name'][$current]))
      echo "*" . $_FILES['picname']['name'][$current] . "* couldn't
be copied!";
    if (is_uploaded_file ($_FILES['picname']['tmp_name'][$current])) {
      move_uploaded_file($_FILES['picname']['tmp_name'][$current],
$dir.$current.".jpg");
      $log_query = "INSERT INTO pictures (pictureID, series) VALUES
('$pID', '$current')";
      $log_result = mysql_query($log_query) or die ("Couldn't Insert
Picture Record!");
    }
} */ -- End curiosity mode ;-) $current++; } On my output, I just get 01234 .. 5 elements. My question is specifically on how to get all 9 to upload, those 5 files, if specified, do indeed upload fine - just clearing that up :-) Any insight? 5 elements seems to be something deliberate, but I can't be sure, myself. Thanks! -Jason


« previous php.general (#120065) next »