The difference between Php.ini-dist and php.ini-recommended (easy to develop and secure friends) _php tutorial

Source: Internet
Author: User
Php.ini-recommended has a higher security level than php.ini-dist. The default is to set Display_errors to off, set MAGIC_QUOTES_GPC to off, and so on. The relative php.ini-dist is the default configuration. So, if you just want to do web testing and general development, use Php.ini-dist, or php.ini-recommended.

See Http://www.php.net for details

Brief description:

If it is a local development study, it is recommended to copy the Php.ini-dist one Save as PHP.ini

If it is used on the server, for security, copy the php.ini-recommended to save as PHP.ini

Application of Phpinidir

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.

http://www.bkjia.com/PHPjc/325710.html www.bkjia.com true http://www.bkjia.com/PHPjc/325710.html techarticle php.ini-recommended has a higher security level than php.ini-dist. The default is to set Display_errors to off, set MAGIC_QUOTES_GPC to off, and so on. And the relative php.ini-dist is the default configuration ...

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.