-3

I tried to extend oscommerce from 6 additional images to 12 images per product on the categories.php

But when I submit it shows only 9 files in the $_FILES array no matter what I change I cannot get more than 9. I tried different variations just for testing it and the array always stops at 9 elements and the 10th gets cut off. Anybody have an idea what could be going on?

this is the sizeof $_FILES and array output. You can see it stops at test2 and the rest is missing

sizeof files:20
Array ( [products_image] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_med] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_lrg] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_sm_1] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_xl_1] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_sm_2] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_xl_2] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_sm_3] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_xl_3] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_sm_4] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_xl_4] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_sm_5] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_xl_5] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_sm_6] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_xl_6] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_sm_7] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_xl_7] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_sm_8] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_xl_8] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [test2] => Array ( [name] => letters_613.gif [type] => image/gif [tmp_name] => /var/www/html/web978/phptmp/php49lS7C [error] => 0 [size] => 3852 ) ) Array ( [products_image] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_med] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_lrg] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_sm_1] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_xl_1] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_sm_2] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_xl_2] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_sm_3] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_xl_3] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_sm_4] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_xl_4] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_sm_5] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_xl_5] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_sm_6] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_xl_6] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_sm_7] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_xl_7] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_sm_8] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [products_image_xl_8] => Array ( [name] => [type] => [tmp_name] => [error] => 4 [size] => 0 ) [test2] => Array ( [name] => letters_613.gif [type] => image/gif [tmp_name] => /var/www/html/web978/phptmp/php49lS7C [error] => 0 [size] => 3852 ) )
Muhammad Usman
  • 12,439
  • 6
  • 36
  • 59
  • the code has a couple of thousand lines but you can imagine it like this:
    and 4 doesnt show in the file array and all files that come after that. The first idea i had was that the form close stops somewhere sooner but thats not the case
    – Daniel Travolto Sep 21 '11 at 18:46
  • i added the sizeof $_FILES and the print_r for $_FILES when i submit – Daniel Travolto Sep 21 '11 at 18:55
  • ok i figured it out there is a max files post variable in PHP.INI that must be set higher. default is 20. the category.php has 33 files in total when i add the additional fields – Daniel Travolto Sep 21 '11 at 19:01

1 Answers1

1

Look for max_file_uploads in http://php.net/manual/en/ini.core.php#ini.sect.file-uploads

Also the collective size is constrained by those settings. It's not OSC which restricts the amount.

mario
  • 144,265
  • 20
  • 237
  • 291