Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

Keep"MaxNavigationItems" between updates

Discussion in 'Database Discussion' started by PatrickVeenstra, Nov 15, 2017.

Tags:
  1. PatrickVeenstra

    PatrickVeenstra Well-Known Member

    Joined:
    Feb 12, 2012
    Messages:
    104
    Likes Received:
    3
    Trophy Points:
    68
    Location:
    Barcelona
    cPanel Access Level:
    Root Administrator
    I'd like to preserve my phpMyAdmin settings, specifically MaxNavigationItems, and the message in phpMyAdmin links to a local copy of Installation — phpMyAdmin 4.8.0-dev documentation

    Even after reading it a couple of times I don't understand what I have to do to keep my settings between updates. What (where?) do I have to edit to keep my settings?

    p.s. Since phpMyAdmin has a filter for table names, is there really a point in paging (by default)?
     
  2. cPWilliamL

    cPWilliamL cP Technical Analyst II
    Staff Member

    Joined:
    May 15, 2017
    Messages:
    257
    Likes Received:
    29
    Trophy Points:
    103
    Location:
    America
    cPanel Access Level:
    Root Administrator
    Hi,

    I believe this value is pulled from a two locations, the current user's cookie(pma_console_config) and the '/usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php' configuration file. If no cookie is found, or if the value is not set in the cookie, then it's pulled from the configuration. I set this value as below:
    Code:
    echo "$cfg['MaxNavigationItems'] = 100;" >> /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php
    
    This should persist updates as well.

    Thanks,
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. PatrickVeenstra

    PatrickVeenstra Well-Known Member

    Joined:
    Feb 12, 2012
    Messages:
    104
    Likes Received:
    3
    Trophy Points:
    68
    Location:
    Barcelona
    cPanel Access Level:
    Root Administrator
    Thanks a lot. There was no cookie value (after storing it in CPanel), so I guess it uses some server storage setting, but I think that editing config.inc.php did the job.
     
  4. kamm

    kamm Active Member

    Joined:
    Jan 17, 2004
    Messages:
    39
    Likes Received:
    0
    Trophy Points:
    156
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    It doesn't persist updates. It would be nice if there was a way to do so...
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    44,367
    Likes Received:
    1,857
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @kamm,

    I encourage you to vote for the following feature request:

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

    Until such a feature is implemented, you could setup a hook that automatically runs after every cPanel update to update the file. Here are the commands you would use to do this:

    Code:
    mkdir -p /root/custom/
    touch /root/custom/postupcp.sh
    chmod 0755 /root/custom/postupcp.sh
    vi /root/custom/postupcp.sh
    When editing this file, add a single line like this:

    Code:
    echo "$cfg['MaxNavigationItems'] = 100;" >> /usr/local/cpanel/base/3rdparty/phpMyAdmin/config.inc.php
    
    Then, to have this script execute automatically after each cPanel update, run this command:

    Code:
    /usr/local/cpanel/bin/manage_hooks add script /root/custom/postupcp.sh --manual --category System --event upcp --stage post
    This will ensure the custom value is preserved through cPanel updates. If you ever need to delete the hook, you can do so using the following commands:

    Code:
    rm /root/custom/postupcp.sh
    /usr/local/cpanel/bin/manage_hooks delete script /root/custom/postupcp.sh --manual --category System --event upcp --stage post
    Thank you.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
    kamm likes this.
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice