While trying to export large databases via phpMyAdmin export database option, we may get an error like Browser can’t find the file. This issue only happen with large databases (eg ~40 MB). Databases can be exported via cPanel > Backup. But phpMyAdmin give control over tables.
Firefox can't find the file at https:// server.com:2087/cpsess5507807938/3rdparty/phpMyAdmin/export.php
Tracing the problem
cPanel error log will give the exact reason
PHP Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 40747922 bytes) in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/OutputBuffering.class.php on line 138
From the above log, it is clear that it is a memory limit problem. So we have to increase the php memory limit.
Fixing the problem
phpMyAdmin uses a local php.ini so we have to modify the local value.
# vi /usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini
Find the field memory_limit and modify
;;;;;;;;;;;;;;;;;;; ; Resource Limits ; ;;;;;;;;;;;;;;;;;;; max_execution_time = 90 ;memory_limit = 128M ; Maximum amount of memory a script may consume (8MB) memory_limit = 512M
The memory limit is now lifted from 128MB to 512MB
Restart the cPanel service
# /etc/init.d/cpanel restart
The problem for the ROOT user (WHM > phpMyAdmin) is now fixed, He can export DBs.
But a normal user (cPanel > phpMyAdmin) may have the problem persists. In that case we need to modify the phpMyAdmin configuration.
For that edit the file config.inc.php
# vi /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php
Add the following field
$cfg['MemoryLimit'] = '512M';
Finally restart the cPanel service
# /etc/init.d/cpanel restart