A common issue cPanel users encounter is when they try to upload large files in cPanel’s third-party applications. An error about the maximum upload file size will occur when, for example, you attempt uploading a large .sql file in phpMyAdmin or a large mbox file in Webmail (Roundcube, Horde).
Find the solution below in this tutorial.
Error Messages
There are several error messages returned when settings in php.ini are not sufficient for the file upload. Such error messages are “No File Found” or “No Input File”.
Common Mistake
A common mistake webmasters or cPanel administrators do, is that they try to increase the PHP values from the php.ini inside their cPanel account. That php.ini is responsible for file uploads on the front-end website/application whereas what’s needed is to update the php.ini of the respective 3rd-party application (e.g. Roundcube webmail).
Solution
To overcome this issue you need to increase the following PHP values to allow the file upload in the respective cPanel application’s php.ini file.
Example: Increase max upload file size for Roundcube
- Connect on your cPanel server via SSH
- cd /usr/local/cpanel/3rdparty/php/73/etc/roundcube (to enter the directory)
- nano php.ini (to edit the file)
- Change the following values into the desired ones to allow your file to be uploaded:
upload_max_filesize
post_max_size
memory_limit - service apache2 restart or service httpd restart (to restart apache web server and your changes to be applied)
Note: If cPanel’s PHP-FPM service is in use, be sure to restart after applying the changes as follows:
root@localhost:~$ /scripts/restartsrv_cpanel_php_fpm
and then this command:
root@localhost:~$ /scripts/restartsrv_cpsrvd