This article mainly describes how to find the php configuration file php. there are two methods for ini path. many users cannot find php after installing php. ini, or an environment installed by others. The method in this article is simple and practical. if you need it, you can refer to php. the ini is located:
The code is as follows:
/Etc directory or/usr/local/lib directory.
If you still cannot find php. ini or find the php. ini modification that does not take effect (in fact, it is not correct), use the following method:
1. create a php file and write the following code
The code is as follows:
Echo phpinfo ();
[Code]
Then, visit the page in the browser and search for php. ini,
2. Execute. (you need to modify php to your own path)
[Code]/usr/local/php/bin/php -- ini
The path where php. ini is located and which path does not contain the php. ini file is displayed,
The code is as follows:
Configuration File (php. ini) Path:/usr/local/php/lib
Loaded Configuration File: (none)
Scan for additional. ini files in: (none)
Additional. ini files parsed: (none)
The php. ini location is modified as follows: the php. ini file is put on/usr/local/lib by default,
You can use the -- with-config-file-path parameter during compilation to modify the storage location of php. ini.
For example,
You can use -- with-config-file-path =/etc
Store php. ini under/etc, and copy php. ini-dist from the source package to/etc/php. ini.