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.

Change max_input_vars

Discussion in 'General Discussion' started by asmythe, Jun 21, 2012.

  1. asmythe

    asmythe Registered

    Joined:
    Jul 23, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    I need to see max_input_vars higher than 1000, but I don't see how to do that using PHP Configuration Editor. Lots of dire warnings about fooling with php.ini on your own ... is there a way to change this setting using standard WHM tools that I'm missing?
     
  2. Infopro

    Infopro cPanel Sr. Product Evangelist
    Staff Member

    Joined:
    May 20, 2003
    Messages:
    14,474
    Likes Received:
    202
    Trophy Points:
    63
    Location:
    Pennsylvania
    cPanel Access Level:
    Root Administrator
    Twitter:
  3. asmythe

    asmythe Registered

    Joined:
    Jul 23, 2009
    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    1
    Yes, I had seen both of those. The first one is no longer relevant to me as I have upgraded, and seems to be a fix to a problem between max_input_vars conflicts with Suhosin, which I don't run. The second one just explains what max_input_vars is.

    I think I could just go in and edit php.ini, but there is such a stern warning about it that I'd prefer to use the WHM php configuration tool. But it doesn't seem to have an entry for max_input_vars, so I'm stumped.
     
  4. parelytic

    parelytic Member

    Joined:
    Jun 22, 2012
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    You would need to login through SSH or through SFTP with the root user. Once in, then you can go about editing the php.ini file which by default should be /usr/local/lib/php.ini . Keep in mind, however, that this php.ini file is the global php.ini on the server, and modifying this will affect all other users on the system.

    If you prefer to use an explorer-style interface, I would recommend WinSCP assuming you're running in Windows. You'll be able to make the necessary modifications to max_input_vars through /usr/local/lib/php.ini.
     
  5. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    Please indicate how to back up a file before editing it. If you are going to edit the /usr/local/lib/php.ini file (the global php.ini), please back it up first:

    Code:
    cp /usr/local/lib/php.ini /usr/local/lib/php.ini.bak`date +%Y%m%d-%H:%M:%S`
    This will copy the php.ini to a file that has the current day and time.

    Of note, I actually would suggest manually editing the php.ini file to ensure integrity, because then you know what values are in it and getting changed. This only applies if you are making backups before editing it.

    Additionally, you should always run the following commands after revising to ensure your changes didn't cause any issue(s):

    Code:
    php -v
    tail -fn0 /usr/local/apache/logs/error_log
    If you corrupted the file in any way with the edit, you'll see that when running the "php -v" command. If anything in the file is duplicated or not found, it will error out in the Apache error log.
     
Loading...

Share This Page