Blog

phpMyAdmin fails to export databases

Tags: cPaneldatabasesphpmyadmin

Published on: August 2, 2014 by Shafeer P

phpMyAdmin fails to export databases

Scenario:

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

 

 

 

Category : cPanel, Troubleshooting

Shafeer P

Shafeer P

Shafeer is currently working as Senior System Engineer at SupportSages. He is capable of tackling time-consuming issues quickly with his advanced scripting abilities. His unchallenged expertise in solving complex issues in a cut-and-dried way makes him a dependable man in the team. The attitude and philosophy he shows on his workplace make his colleagues call him 'Mr. Perfectionist'. Furthermore, he is a travel and photography enthusiast, and loves to spend his leisure times on music and DIY arts.

You may also read:

Comments

Add new commentSIGN IN

Let's Connect

Get new updates

Categories

$0.000 items