PHP see only 20 uploading files at a time

后端 未结 8 1430
面向向阳花
面向向阳花 2020-11-29 10:48

When I try to upload more than 20 files at a time, then the web server see only first 20. Any other files are just ignored. What is the problem?

Simple code to try:<

8条回答
  •  天命终不由人
    2020-11-29 11:47

    Recently I came across the same issue, but unfortunately none of the above solutions worked for me. So I think I must share the worked solution here

    When I was trying to upload 50+ images, the server was limiting it to 20. (I was working on a Centos Server with PHP 5.3.6)

    Setting max_file_uploads = 100 in PHP.ini file didn't help even but the number file upload limit changed to 25

    On searching the numeric value 25 in the phpinfo() page, I came across a parameter suhosin.upload.max_uploads with value 25.

    Setting suhosin.upload.max_uploads to 100 along with max_file_uploads = 100 in the PHP.ini file worked, now on the server we can upload upto 100 files. (I am not sure if we have any other file where we modify the values suhosin parameters , but setting suhosin values in either php.ini OR php.d/suhosin.ini will work :) )

    max_file_uploads = 100    
    suhosin.upload.max_uploads=100
    

    http://www.hardened-php.net/suhosin/configuration.html

提交回复
热议问题