Our features site is undergoing a refresh! Be sure to explore the revamped site and discover our latest product roadmap launching here on Monday, March 18th.

PHPMyAdmin - Editing Memory Limit, Max Input Vars, Upload Size, & Other Settings via WHM

dhaupin shared this idea 7 years ago
Open Discussion

As a server administrator I would like cPanel to provide a WHM interface that would allow me to edit PHPMyAdmin settings, and allowing those settings to be retained over upgrades, without requiring me to manually replace the configuration file after every update.

------

For examples, some PHPMyAdmin settings that should be more accessible are:


  • Max Input Time
  • Max Execution Time
  • Max Upload Size
  • Max Post Size
  • Max Input Vars
  • Memory Limit

Context:

We have run into the need to increase limits/power while trying to use PHPMyAdmin with larger databases. Currently the fix for this is to edit the primary backend php.ini (/usr/local/cpanel/3rdparty/php/56/etc/php.ini) then rebuild when complete (/usr/local/cpanel/bin/install_php_inis). This will "percolate" changes down into other php.ini's including one found at the PHPMyAdmin install (/usr/local/cpanel/3rdparty/php/56/etc/phpmyadmin/php.ini).


The problem is however that PHPMyAdmin requires a bit more oomph + limits than WHM or other backend apps may require. Editing just the PHPMyAdmin php.ini or config.inc.php will not persist. The other problem is that changing backend PHP directives in general requires SSH and vimming around, which can be tedious just to [temporarily] bump values for a large DB dump.

Replies (2)

photo
4

One of the recommended ways to accomplish this, without actually satisfying the request, is to make your desired changes to the configuration file, and then replace the file after the nightly updates. You may run into problems when an update happens between major versions (as will happen on upgrade from version 62 to 64), but between minor versions you should be fine.

Once you are satisfied that the configuration file is how you want it, copy the configuration file to a safe location (e.g. /root/custom_configuration).

Next create the postupcp file, if it doesn't already exist.


  1. touch /scripts/postupcp
  2. chmod o+x /scripts/postupcp

Finally add the necessary commands to copy your configuration file in place. Here's one untested example:


  1. #/bin/sh
  2. cp -f /root/custom_configuration/config.inc.php /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php

Test the script after you create it. upcp will call that script near the end of every update. I'd recommend putting some output or comments in the script so you have a reminder of what it is doing.

You might also want to add some logic that would retain the cPanel-provided configuration when the postupcp script is run.

photo
1

Another item that would be nice to set in phpMyAdmin is to enable SSL for the connection to the database server, especially when remote MySQL/Mariadb profile is in use.

Leave a Comment
 
Attach a file