Home  >  Article  >  Backend Development  >  Notes on setting up PHP and Apache environment_PHP tutorial

Notes on setting up PHP and Apache environment_PHP tutorial

WBOY
WBOYOriginal
2016-07-14 10:10:381002browse

What is the role of PHPIniDir when setting up Apache?
What is the role of PHPIniDir when setting up Apache?
Unlike php4 which searches for php.ini under %SystemRoot%, PHP5 searches for PHP.ini in the following order:

* PHPIniDir (Apache 2 module only)
* Registry key value: HKEY_LOCAL_MACHINE—SOFTWARE—PHPIniFilePath
* Environment variable:%PHPRC%
* PHP5 directory (for CLI), or web server directory (for SAPI modules)
* Windows directory (C:windows or C:winnt)
So if it is Apache + PHP5, you can use PHPIniDir to specify the path of the php5 configuration file php.ini.

As in httpd.conf:
#Run php as apache module
LoadModule php4_module /apache/php/sapi/php4apache.dll
PHPINIDir /apache/php/php.ini


To rewrite your PHP installation path here

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/477461.htmlTechArticleWhat is the role of PHPIniDir when setting up Apache? What is the role of PHPIniDir when setting up Apache? Unlike php4, which searches php.ini under %SystemRoot%, PHP5 follows the following order...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn