Let us know two ways to find the path of the php configuration file php. ini. Usually php. ini is located: /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
- Echo phpinfo ();
Then, visit the page in the browser and search for php. ini. The result of environment variables in the phpinfo function is used. 2. Execute. (you need to modify php to your own path) /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,
- 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. All major routes can be used in Rome. you can refer to one of the above two methods to find the location of the php. ini file. |