Skip to content
This repository has been archived by the owner on Mar 27, 2024. It is now read-only.

500 internal server error when uploading lots of files #26

Open
jentuva opened this issue Feb 2, 2016 · 1 comment
Open

500 internal server error when uploading lots of files #26

jentuva opened this issue Feb 2, 2016 · 1 comment

Comments

@jentuva
Copy link

jentuva commented Feb 2, 2016

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
Copy link

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants