Phpinidir the difference between php.ini-dist and php.ini-recommended in PHP source program
Application of Phpinidir (reproduced)
Phpinidir is the path of PHP initialization file php.ini, in the past we put php.ini in the Windows directory, in PHP5, php.ini search path is no longer limited to PHP4 era%systemroot%, PHP5 will look for php.ini in the following order:
1, Phpinidir (Apache 2 module only, this instruction is only used when PHP as an Apache module, 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 scenarios, it is best to use Phpinidir in conjunction with Apache2, which is to include in the apache2/conf/httpd.conf file:
# Configure the path to PHP.ini
Phpinidir "c:/php"
Also, on NTFS, remember to give the server Read permission to open php.ini.
===============================================================================
Attached: The difference between php.ini-dist and php.ini-recommended
According to Php.ini-dist's instructions, the difference is that
php.ini-dist suitable for development program use, while
Php.ini-recommended has a high safety setting, suitable for on-line product use。 Therefore, for safety and efficiency reasons, it is recommended to use php.ini-recommended as the blueprint for php.ini rather than using php.ini-dist.
The official notes are as follows:
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 this should be taken before going online with your site, please consult PHP.I Ni-recommended and http://php.net/manual/en/security.php.