The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

SOLVED [case CPANEL-12822,case CPANEL-13105] phpMyAdmin max_input_vars error

Discussion in 'Database Discussions' started by rarod, Apr 20, 2017.

Tags:
  1. rarod

    rarod Member

    Joined:
    Apr 20, 2017
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    I am getting this error message when I try to export a database in phpMyAdmin:

    >Warning: a form on this page has more than 1000 fields. On submission, some of the fields might be ignored, due to PHP's max_input_vars configuration.

    System info:
    cPanel & WHM 64.0 (build 13)
    phpMyAdmin Version information: 4.6.6
    EasyApache 4
    CloudLinux release 7.3

    In WHM 62.0 (build 21) phpMyAdmin 4.0.10.18 this was working ok.

    I tried changing max_input_vars in various php.ini but I get the same error.

    Any ideas?
     
  2. cPanelChrisI

    cPanelChrisI Technical Analyst II
    Staff Member

    Joined:
    Mar 24, 2014
    Messages:
    58
    Likes Received:
    9
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hello,

    The php.ini for phpmyadmin should be this one:

    /usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini

    Do you still receive the same error if you modify that one?

    Thanks!
     
  3. rarod

    rarod Member

    Joined:
    Apr 20, 2017
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    I changed max_input_vars to 10000 in /usr/local/cpanel/3rdparty/etc/phpmyadmin/php.ini:
    • Is working as expected if I open it from WHM->SQL Services->phpMyAdmin: I get no errors.
    • If I open phpMyAdmin from a cPanel user account I get the same error: max_input_vars is 1000.
    Thanks.
     
  4. cPanelChrisI

    cPanelChrisI Technical Analyst II
    Staff Member

    Joined:
    Mar 24, 2014
    Messages:
    58
    Likes Received:
    9
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    I tested this out on my test server and found that raising the max_input_vars in this file resolves the error when exporting a database that has more than 1000 tables.

    /usr/local/cpanel/3rdparty/etc/php.ini

    Does changing it there solve the issue for you as well?

    Thanks!
     
  5. rarod

    rarod Member

    Joined:
    Apr 20, 2017
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    I tried changing it in /usr/local/cpanel/3rdparty/etc/php.ini: same problem.

    Maybe a compatibility issue with cagefs/php-selector?
     
  6. cPanelChrisI

    cPanelChrisI Technical Analyst II
    Staff Member

    Joined:
    Mar 24, 2014
    Messages:
    58
    Likes Received:
    9
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    If you are using Cloudlinux and cagefs, you may also need to update cagefs to load the new value with this command.

    cagefsctl --force-update

    If that doesn't work, you may need to rebuild the cagefs with this command.

    cagefsctl --reinit

    thanks!
     
  7. rarod

    rarod Member

    Joined:
    Apr 20, 2017
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    Tryied with "cagefsctl --force-update" and "cagefsctl --reinit". Still the same.

    I made a "ps aux | grep user6517" while loading phpMyAdmin and I got this:

    user6517 665209 7.0 0.0 241536 19292 ? S 09:46 0:00 /usr/local/cpanel/3rdparty/php/56/bin/php-cgi /usr/local/cpanel/base/3rdparty/phpMyAdmin/navigation.php

    Is php-cgi using this php.inis?
     
  8. QuentinC

    QuentinC Registered

    Joined:
    Jan 10, 2013
    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    DataCenter Provider
    Hi All !

    Here my process:

    nano /usr/local/cpanel/3rdparty/etc/php.ini
    ---EDIT--
    max_input_vars = 10000
    ----
    /usr/local/cpanel/bin/install_php_inis
    /scripts/restartsrv_cpanel_php_fpm

    Best regards!
     
  9. rarod

    rarod Member

    Joined:
    Apr 20, 2017
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    This workerd for me too.

    Thanks QuentinC!

    Is this php.ini change persistent in cPanel updates?
     
    #9 rarod, Apr 25, 2017
    Last edited by a moderator: Apr 25, 2017
  10. rarod

    rarod Member

    Joined:
    Apr 20, 2017
    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Spain
    cPanel Access Level:
    Root Administrator
    In a internal cPanel ticket I got this:

    Changes to /usr/local/cpanel/3rdparty/etc/php.ini will persist but will always need the following run afterward.
    /usr/local/cpanel/bin/install_php_inis
     
  11. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    34,950
    Likes Received:
    1,071
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    To update, internal case CPANEL-12822 is open to determine how to best address the issue where databases with more than 1000 tables can't be exported in phpMyAdmin because the default max_input_vars setting is too low. I'll update this thread with more information on the status of this case as it becomes available. In the meantime, the workaround is to manually increase the value in the /usr/local/cpanel/3rdparty/etc/php.ini file, and then run the following commands:

    Code:
    /usr/local/cpanel/bin/install_php_inis
    /scripts/restartsrv_cpanel_php_fpm
    Thank you.
     
  12. Dhaupin

    Dhaupin Active Member

    Joined:
    Jan 3, 2014
    Messages:
    35
    Likes Received:
    3
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Changes there don't persist. Cpanel updated yesterday and wiped out the edits I made to usr/local/cpanel/3rdparty/etc/php.ini (which is a symlink to /usr/local/cpanel/3rdparty/php/56/etc/php.ini). This happened on 3 different servers.
     
  13. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    34,950
    Likes Received:
    1,071
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    As a temporary workaround, you could setup a custom bash script that replaces the max_input_vars value and then setup a hook to automatically run that custom bash script after each cPanel update. EX:

    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 line such as this:

    Code:
    replace "; max_input_vars = 1000" "max_input_vars = 2000" -- /usr/local/cpanel/3rdparty/etc/php.ini ; /usr/local/cpanel/bin/install_php_inis ; /scripts/restartsrv_cpanel_php_fpm
    Replace "2000" with the new value you'd like to set. 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.

    Note: Ensure to remove this custom script using the following commands once we publish a resolution for this issue:

    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.
     
  14. Dhaupin

    Dhaupin Active Member

    Joined:
    Jan 3, 2014
    Messages:
    35
    Likes Received:
    3
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Thanks Michael. In case folks don't wanna set up scripts, hooks, and crons, here is a function you can run from root for an on-demand fix. In this example 6000 is the value of max_input_vars written to ini's:

    Code:
    # whm-max-input 6000
    
    To enable it, put this in /root/.bashrc and run command ". /root/.bashrc" to load into session:
    Code:
    whm-max-input() {
        if [ -z "$1" ]; then
            vars="2000"
        else
            vars=$1
        fi
    
        sed -in --follow-symlinks "s/[\; ]?max_input_vars = [0-9].*/max_input_vars = ${vars}/" /usr/local/cpanel/3rdparty/etc/php.ini
    
        /usr/local/cpanel/bin/install_php_inis
        /scripts/restartsrv_cpanel_php_fpm
        php -v
    }
    
    Enjoy
     
    cPanelMichael likes this.
  15. Dhaupin

    Dhaupin Active Member

    Joined:
    Jan 3, 2014
    Messages:
    35
    Likes Received:
    3
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Yikes, not sure why but lots of PMA fails now for a certain DB that didnt seem to get much larger.

    I cant edit the post above, so to extend upon that max-whm function to include some other boosts as well as a way to revert it back to default: gist.github.com/dhaupin/1f7ac8c7369bc60f385430e449a611eb
     
    #15 Dhaupin, May 12, 2017
    Last edited by a moderator: May 13, 2017
  16. EMNE

    EMNE Registered

    Joined:
    Jul 19, 2016
    Messages:
    1
    Likes Received:
    1
    Trophy Points:
    1
    Location:
    Sloveni
    cPanel Access Level:
    Root Administrator
    I just can't understand why stuff like this can not be fixed asap (few days) by cPanel. This issue probably creates thousands of tickets for providers and the fix of default php.ini setting should take about a 30 seconds for a cPanel developer. Just setting max_input_vars to 10000 by default, would have solved all the problems. Can someone explain this logic to me please?
     
    DomineauX likes this.
  17. Havri

    Havri Active Member

    Joined:
    Oct 28, 2013
    Messages:
    38
    Likes Received:
    5
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hello,

    In my case, I had some additional steps, as the user was still getting the error. What I did was:

    Modified values in:
    /usr/local/cpanel/3rdparty/php/56/etc/php.ini

    cagefsctl --force-update
    service cpanel restart

    Remove user's cpanel cache folder:
    rm -rf /home/$user/.cpanel

    After that, run scripts
    /usr/local/cpanel/bin/install_php_inis
    /scripts/restartsrv_cpanel_php_fpm

    Relog into user's cPanel.

    I'm running:
    Cloudlinux 7 (CageFS and all)
    cPanel 11.64.0.21
    EasyApache 4

    Regards.
     
    #17 Havri, May 17, 2017
    Last edited: May 17, 2017
  18. DomineauX

    DomineauX Well-Known Member
    PartnerNOC

    Joined:
    Apr 12, 2003
    Messages:
    421
    Likes Received:
    6
    Trophy Points:
    18
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Waiting for a fix to be incorporated by default.
     
  19. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    34,950
    Likes Received:
    1,071
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello,

    To update, the following resolutions are included with cPanel version 64.0.24:
    • Fixed case CPANEL-12822: Bump max_input_vars to 10000 for phpMyAdmin.
    • Fixed case CPANEL-13105: Ensure phpMyAdmin uses the correct ini files.
    The full change log is available at:

    64 Change Log - Change Logs - cPanel Documentation

    Thanks!
     
  20. Havri

    Havri Active Member

    Joined:
    Oct 28, 2013
    Messages:
    38
    Likes Received:
    5
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Hello,

    I just have a couple of questions, as this is still not solved for me. Which php.ini has the cPanel update modified? All I see is the 1000 value for max_input_vars instead of 10000:

    Code:
    [root@server1 php]# pwd
    /usr/local/cpanel/3rdparty/php
    [root@server1 php]# grep -ir "max_input_vars" .
    ./56/etc/php.ini.dist:; max_input_vars = 1000
    ./56/etc/php.ini,v:; max_input_vars = 1000
    ./56/etc/php.ini.bak:; max_input_vars = 1000
    ./56/etc/roundcube/php.ini:; max_input_vars = 1000
    ./56/etc/phpmyadmin/php.ini:; max_input_vars = 1000
    ./56/etc/phppgadmin/php.ini:; max_input_vars = 1000
    ./56/etc/horde/php.ini:; max_input_vars = 1000
    ./56/etc/php.ini:; max_input_vars = 1000
    Should I look somewhere else? Do I need to update manually again or should it work by default?

    Thank you.
     
Loading...

Share This Page