Home >Backend Development >PHP Tutorial >Modify the Apache configuration to specify the location of the php configuration file phpini

Modify the Apache configuration to specify the location of the php configuration file phpini

WBOY
WBOYOriginal
2016-07-29 09:09:391797browse

Generally after Apache installs php, the default loading location of the php configuration file is in the php/lib/ folder. If there is no php.ini file in this folder, apache will not be able to find the php configuration file. There are two types of Method,
The first method: copy a configuration file of the same version of php to the default loading folder, then the configuration in the configuration file will be applied.

The second method: specify an existing php.ini location. The specific method is as follows:

(Add PHPiniDir /usr/local/lib/php.ini in the last line of the httpd.conf file)

As shown below:

Modify the Apache configuration to specify the location of the php configuration file phpini

The modified Apache configuration is as follows:

You can view it by accessing a php file that means output phpinfo ().

Modify the Apache configuration to specify the location of the php configuration file phpini

The above introduces how to modify the Apache configuration to specify the location of the php configuration file phpini, including the content. I hope it will be helpful to friends who are interested in PHP tutorials.

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