If you run a phpinfo();
does it show exactly what is in the php.ini or if settings are changed on the fly via php with methods like ini_set()
or via .htaccess
will they be shown in phpinfo?
Because every system is setup differently, phpinfo() is commonly used to check configuration settings and for available predefined variables on a given system. phpinfo() is also a valuable debugging tool as it contains all EGPCS (Environment, GET, POST, Cookie, Server) data.
The phpinfo() function can be used to output a large amount of information about your PHP installation and can be used to identify installation and configuration problems. To run the function, just create a new file called test. php and place it into the root directory of your web server.
ini file is the default configuration file for running applications that require PHP. It is used to control variables such as upload sizes, file timeouts, and resource limits. This file is located on your server in the /public_html folder.
phpinfo()
shows, in the "Local Value" column, the current configuration ; i.e.
php.ini
VirtualHost
or in .htaccess
filesini_set
In the end, it shows the configuration values that would be / are used by your script.
As a sidenote : it also display informations that are not-really "configuration" per-se, like the configure line that was used to compile PHP, the version of the Zend Engine, ...
It will show the current running environment, not just what is in php.ini. Anything that changes the environment like the methods you mentioned will be reflected.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With