• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Increase PHP max_input_vars

Matt_Hill

New Pleskian
Hi,

I'm using php 5.5.9 with Plesk 12 running on Ubuntu and am trying to increase the max_input_vars value.

For the PHP settings in the additional directives box I have added the following: max_input_vars = 5000

2utmhja.jpg


I have saved the settings and even rebooted the server, however the max_input_vars is stuck at 1000 when looking at the php configuration.

Am i going about doing this the right way?
 
Matt_Hill,

This path from your phpinfo() output looks strange for me:
Loaded Configuration File /var/www/vhosts/system/dev./etc/php.ini

this should be a site name (like: system/dev.domain.com/etc/php.ini), and php.ini should contain your customized values.
[root@ppu12-0 php]# cat /var/www/vhosts/system/ppu12-0.demo.pp.plesk.ru/etc/php.ini |grep max_input_vars
max_input_vars = 5000
 
That is correct it is dev.mydomain.com, i simply edited the rest of it out to avoid publishing the URL for a site that is not live yet.

I did think of editing the php.ini directly (/var/www/vhosts/system/dev.mydomain.com/etc/php.ini)

However if i do right at the top of the php config it states:

ATTENTION!
;
; DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
; SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
 
But do you have line

max_input_vars = 5000

in this file /var/www/vhosts/system/dev.mydomain.com/etc/php.ini?
 
Hi Matt_Hill,

sometimes the custom PHP.ini settings for a domain get lost somehow ( an investigation of the panel.log could point to the issue, but in some cases it's a browser issue, because an old cached version of the Plesk Control Panel site is sent to the server - FireFox for example makes this mistake, when the cache settings are the standard ones ), but instead of the investigations, you could try to switch the PHP-handler for the specific domain to for example "apache-module", save the settings and switch back to FastCGI again. Please check after these steps, if the custom settings you made over the Plesk Control now appear in your domain specific PHP.ini at "/var/www/vhosts/system/dev.mydomain.com/etc/php.ini" and be so kind to report it here.
 
Hi UFHH01, that wasnt that exact issue, however you set me off in the right direction to work out what was wrong.

I noticed on other domain's the server is hosting the max_input_vars could be changed and actually applied and worked fine. I then noticed for the domain i was having problems with I had no options to change that PHP was been run as, however on all the other domains I had added to the server i could change that option fine, as can be seen in the screenshot below:

2mmfo82.jpg


I then compared the Web Server Setting of the domain i was having issues with, to the domains that worked ok. I realised I had disabled "Smart static file processing" on the domain i was having problems changing max_input_vars setting on. When i re enabled this all "additional configuration directives" for PHP were working ok again.

ne9awl.jpg


I'm not sure why that broke additional configuration directives, as other settings Plesk has GUI options for (such as the php memory limit) still worked fine, only items in the "additional configuration directives" were not applied to the php configuration.

Thanks for the help IgorG, dash and UFHH01, glad to have this sorted out!
 
Back
Top