Usually the location of php.ini is:
If you still cannot find php.ini or if you find php.ini and the modification does not take effect (in fact, you did not find it correctly), please use the following method:
1. Create a new php file and write the following 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 method to modify the location of php.ini is as follows: The php.ini file is placed 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
to store php.ini under /etc, and then copy php.ini-dist from the source package to / etc/php.ini.