asmythe

Registered
Jul 23, 2009
3
0
51
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?
 

asmythe

Registered
Jul 23, 2009
3
0
51
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.
 

parelytic

Member
Jun 22, 2012
6
0
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.
 

cPanelTristan

Quality Assurance Analyst
Staff member
Oct 2, 2010
7,607
40
248
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.