Handling error “You probably tried to upload a file that is too large. Please refer to documentation for a workaround for this limit.”Usually, we come across such errors when we try to import a large file in to MySQL through phpmyadmin. This is because there is a pre-defined file limit in PHP for file upload which is 2MB.You may change the file upload limit as per your requirement by changing php configuration following the below steps :1. Navigate to apache2 directory and open php.ini file using vi or vim editor.
root@user-B85M-D3H:~# vim /etc/php5/apache2/php.ini
2. Change the values of the following lines to as per your requirement.(I am changing the limit to 120 MB here)
upload_max_filesize 120M //file size
post_max_size 120M
max_execution_time 200
max_input_time 200
3. Please ensure that the max_execution_time, max_input_time should always be greater than upload_max_filesize and post_max_size.
4. Once you make the changes, save the file and restart the apache server using the command :
service apache2 restartÂ
Hope this helps. Happy coding!