Automated manner to detect origin of PHP Directive Local Value that overrides Master Value

JAB Creations

Active Member
Nov 21, 2009
44
7
58
So PHP's info provides two "Directives": Local Value and Master Value.

Using PHP (and the terminal by extension if need-be) how can I automate my system to determine where local values are being defined? I'll be managing many servers at some point and I'd like to avoid pointless wild goose chases.

In example I've set PHP's max_input_vars to a much lower setting than the server's 10,000! Different servers imply different configurations however ultimately the same software will be running. I'm not interested in having the server do a grep (painfully slow compared to Advanced Find and Replace...from Windows...on Wine!) every single time I open up the server status page to see if where an issue may be coming from.
 

andrew.n

Well-Known Member
Jun 9, 2020
951
352
63
EU
cPanel Access Level
Root Administrator
  • Like
Reactions: cPRex

JAB Creations

Active Member
Nov 21, 2009
44
7
58
... if you create a PHP info page on the domain it will also have a "Loaded Configurations" section that tells you what ini files are being read
I have that built in to my platform - could you please tell me exactly where in PHP's info those details are?
 

andrew.n

Well-Known Member
Jun 9, 2020
951
352
63
EU
cPanel Access Level
Root Administrator
If you open the php info page then this is at the 7th row (Loaded Configuration File).
 
  • Like
Reactions: cPRex

JAB Creations

Active Member
Nov 21, 2009
44
7
58
Unfortunately after going through everything and talking with a good tech at my host we discovered the files were:
  • /home/example1/php.ini
  • /home/example1/.htaccess
  • /home/example1/user.ini
When we changed the settings and restarted the HTTP server everything worked properly.

This is a cPanel thing, not PHP.

So again, how can I have cPanel tell me where it is pulling "Local Value" settings from?
 

andrew.n

Well-Known Member
Jun 9, 2020
951
352
63
EU
cPanel Access Level
Root Administrator
We already answered this question, please see what we said before :)