1

I have a file upload system which, in PHP, limits to 20 files at once, even though I select 25-30 files it only uploads 20. I would like to know why this problem exists and if there is a fix to this either from php.ini or from anywhere.

2
  • 1
    Is it so hard to open php.ini and search for any upload related configuration? max_file_uploads is what you need to change. Commented Feb 18, 2012 at 8:28
  • i actually looked for that and it wasn't in my php.ini but I just added.. If you posted as answer I would select it. Anyways, thanks for the response. Commented Feb 18, 2012 at 8:29

2 Answers 2

1

change max_file_uploads to whatever value you like in your php.ini. but beware of few gotchas

max_file_uploads counts empty upload fields as if they were being used

there is a good article on this that you should read

Sign up to request clarification or add additional context in comments.

2 Comments

I knew it would count, therefore I have only one file box which has the attribute multiple, meaning whatever you select is counted as file, otherwise... nothing happens.
I just thought I should make you aware. Cheers!
0

what version of PHP are you using? If there was no max_file_uploads inside your php.ini, you may be using old version that does not support this configuration directive, so adding it should not change anything.

Other thing that can limit number of files uploaded is suhosin.upload.max_uploads if your server is running with suhosin extension.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.