CodeIgniter-Multi-Upload icon indicating copy to clipboard operation
CodeIgniter-Multi-Upload copied to clipboard

500 internal server error when uploading lots of files

Open jentuva opened this issue 9 years ago • 1 comments

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.

jentuva avatar Feb 02 '16 16:02 jentuva

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

shubhamt619 avatar Nov 01 '16 06:11 shubhamt619