I installed php using Homebrew on mac OS (Sierra).
I want to edit php.ini, but I don't know where it is.
Also, please let me know the location of the folder containing the php body.
How to find it.
Thank you for your cooperation.
add
$php-i | grep "Loaded Configuration File"
This command identifies the location of the ini file.
But I don't know where the folder where php is installed.
Please tell me how to find it.
Use the which
command to locate specific commands (execution files) in Unix-like operating systems such as Macs.
whichphp
displays the highest priority executable used when you enter php
.
If there are multiple executables with the same name, which-aphp
displays them all.
In addition, information about php
packages in brew
can be found in brew info php
, so
Among them was the following description.
You can also find the location of php.ini
using this method.
The php.ini and php-fpm.ini file can be found in:
/usr/local/etc/php/7.3/
Also, files are distributed in multiple locations based on Filesystem Hierarchy Standard
adopted by Unix-affiliated operating systems.
Each distribution has slightly different rules and it's hard to memorize them all, so
First of all, I think it's good to remember that there are rules like that.
If you are in a Homebrew environment, you might want to check with brews<PACKAGE>
instead of the which
command.
$brewls<PACKAGE>
Note:
List all files in a homebrew package-Stack Overflow
© 2024 OneMinuteCode. All rights reserved.