I get similar errors in my error_log in php when users are uploading their files
PHP Warning: POST Content-Length of 11933650 bytes exceeds the limi
8388608 bytes is 8M, the default limit in PHP. Those changes to php.ini should indeed solve the problem (make sure your restart your Apache server after making them).
Memory limit shouldn't need to be changed here.
There might be more than just one php.ini file. For example, when using WAMP there are 2 php.ini files in following directories:
C:\wamp\bin\apache\apache2.4.9\bin
C:\wamp\bin\php\php5.5.12
You need to edit the first one.
I disagree, but this solution to increase the file size in php.ini or .htaccess, will't work if the user send a file larger than allowed in the server application. I suggest validating this on the frontend. Example:
$(document).ready(function() {
$ ('#your_input_file_id').bind('change', function() {
var fileSize = this.files[0].size/1024/1024;
if (fileSize > 2) { // 2M
alert('Your custom message for max file size exceeded');
$('#your_input_file_id').val('');
}
});
});