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.

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:
    6
    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:
    45
    Likes Received:
    6
    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:
    6
    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:
    45
    Likes Received:
    6
    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:
    6
    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:
    45
    Likes Received:
    6
    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:
    6
    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:
    3
    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:
    6
    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 at 3:32 AM
    Last edited by a moderator: Apr 25, 2017 at 4:11 AM
  10. rarod

    rarod Member

    Joined:
    Apr 20, 2017
    Messages:
    6
    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,345
    Likes Received:
    1,003
    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:
    31
    Likes Received:
    2
    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,345
    Likes Received:
    1,003
    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.
     
Loading...

Share This Page