After downloading php, there will be two php. ini: php. ini-dist and php. ini-recommended during configuration. What is the difference? What should I do if I select a suitable version?
After downloading php, there will be two php. ini: php. ini-dist and php. ini-recommended during configuration. What is the difference? What should I do if I select a suitable version?
Php. ini-recommended has a higher security level than php. ini-dist. By default, display_errors is set to off, magic_quotes_gpc is set to Off, and so on. The relative php. ini-dist is the default configuration. Therefore, if you only want to perform web Testing and general development, use php. ini-dist, or use php. ini-recommended.
For more information, see
Simple Description:
For local development and learning, we recommend that you copy php. ini-dist and save it as php. ini.
For security purposes, copy php. ini-recommended and save it as php. ini.
Application of PhpIniDir
PhpIniDir is the PHP initialization file. ini path. ini is stored in the windows directory. In PHP5, PHP. the ini search path is no longer limited to % SystemRoot % in the PHP4 era. PHP5 searches for PHP in the following order. ini:
1. PHPIniDir (Apache 2 module only. This command is only used when PHP is used as an Apache module and does not support CGI running PHP)
2. Key Value: HKEY_LOCAL_MACHINE/SOFTWARE/PHP/IniFilePath
3. environment variable: % PHPRC %
4. PHP5 directory (for CLI) or web Server Directory (for SAPI modules)
5. Windows Directory (C:/windows or C:/winnt)
In these five solutions, it is best to use PHPIniDir in combination with Apache2, that is, add the following to the apache2/conf/httpd. conf file:
# Configure the path to php. ini
PHPIniDir "C:/php"
In addition, remember to grant the read permission of PHP. ini to the server on NTFS.