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

WBOY
Release: 2016-07-29 09:09:39
Original
1735 people have browsed it

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.

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!