I configured php.ini and changed the maximum allowed size for 12MB upload.
In PHP, I also limited the upload size to 12MB, as follows:
if($_FILES['imagem']['size']>12582912){
echo "Limite máximo 12 MB!";
//...
}
The problem is if you try to upload a file larger than 12MB, it does not show the error and simply does nothing.
If you change php.ini and increase the limit to 1GB (for example) and only in the application limiting to 12MB, this works well if you try to send a file with more than 12MB, the error message appears.
Why does not the error appear when I limit everything to 12MB (php.ini and script) and try to upload more than 12MB?