Categories
cPanel linux

Fatal error: Allowed memory size of 134217728 bytes exhausted – MySQL error – PHPMyAdmin

I had a client trying to import a 200M zip file to phpmyadmin to import into his MySQL database, he kept receiving this error:

Fatal error: Allowed memory size of 134217728 bytes exhausted (tried to allocate 201380904 bytes) in /usr/local/cpanel/base/3rdparty/phpMyAdmin/libraries/zip_extension.lib.php on line 65

It ends up that phpmyadmin is using its own php.ini config, and defaults the memory size to 128M.

Edit the file : /usr/local/cpanel/3rdparty/etc/php.ini.dist

there is a line that says memory_limit, change that to what you’d like. I changed mine to 264M.

You will want to restart cPanel as well:

/etc/init.d/cpanel restart

You will lose this setting upon reboot, so if you want to keep it, you will want to run this:

echo "/usr/local/cpanel/3rdparty/etc/php.ini.dist" >> /etc/cpanelsync.exclude

This will exclude the file when it goes to sync/update with cPanel.

One reply on “Fatal error: Allowed memory size of 134217728 bytes exhausted – MySQL error – PHPMyAdmin”

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.