stvnthomas / CodeIgniter-Multi-Upload

Multiple file upload support for CodeIgniter 2.x.
151 stars 158 forks source link

500 internal server error when uploading lots of files #26

Open jentuva opened 8 years ago

jentuva commented 8 years ago

I tried to upload many files and it worked perfectly but when I tried to upload like more that 50 pictures I received 500 internal server error these are the configurations I used :

$config['upload_path'] = './uploads/screenshots/'; $config['allowed_types'] = 'jpg|jpeg|png'; $config['remove_spaces'] = TRUE; $config['xss_clean'] = TRUE; $config['encrypt_name'] = TRUE; $config['max_size'] = '10240';

the error occured only when $config['xss_clean'] is set to TRUE I tracked the code until I found that in the method do_xss_clean() in the CI_Upload class it gives me the 500 server error when there is a return value that equals true after updating the memry limit when I removed this line it worked fine ini_set('memory_limit', $new_memory);

I don't know for sure but I think that resetting the memory many times is the problem

Notes :

  1. I tried to display the errors by all means but no use it gave me 500 internal server error or an empty response.
  2. I already set my upload_max_filesize , post_max_size , max_file_uploads and I'm positive they work.
  3. as I said the error only occurred in this conditions otherwise it worked perfectly.
shubhamt619 commented 8 years ago

Have u checked max file upload Size in ur php.ini ???