I failed to find php. ini using the command {code...}, but the apache + php application on the server can run normally. How can I find the php. ini file read by apache? I use commands
find / -name 'php.ini'
Php. ini is not found, but apache + php applications on the server can run normally.
How can I find the php. ini file read by apache?
Reply content:
I use commands
find / -name 'php.ini'
Php. ini is not found, but apache + php applications on the server can run normally.
How can I find the php. ini file read by apache?
Use PHP Functionsphpinfo()
Lookphp.ini
In which region?
But youfind
No.
You can copy the php. ini-development or php. ini-production of the php source codephpinfo()
The object type, such
sudo mv php.ini-development /usr/local/php/lib/php.ini
Note that this development is intended for production systems.
Apache has not been used for a long time. Since you can run it, it is estimated that you have used the default configuration.
In apache, even if you set php. ini, php_flag and. htaccess can override your php. ini.
Same as @ JohnLui's answer, usephpinfo();
Output CurrentPHP
And there isLoaded Configuration File
Correspondingphp.ini
File Location.
In addition,php.ini
Yes.php.ini
So it is useless to search for this file name.
Command line can be obtained using php-I | grep php. ini.