PhpIniDir application php source code. ini-dist and php. differences between ini-recommended and PhpIniDir applications (reproduced) PhpIniDir is the PHP initialization file php. 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. php is used in the PhpIniDir application in the php source program. ini-dist and php. ini-recommended differences
Application of PhpIniDir (reproduced)
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. Registry 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.
========================================================== ========================================================
Appendix: differences between php. ini-dist and php. ini-recommended
According to php. ini-dist, the difference between the two is that
Php. ini-dist suitable for development programs, And
Php. ini-recommended has high security settings and is suitable for product launch.. Therefore, for security and efficiency considerations, we recommend that you use php. ini-recommended as the blueprint for php. ini instead of using php. ini-dist.
Official instructions are as follows:
This is the default settings file for new PHP installations.By default, PHP installs itself with a configuration suitable for development purposes, and *NOT* for production purposes.For several security-oriented considerations that should be taken before going online with your site, please consult php.ini-recommended and http://php.net/manual/en/security.php.