How do I find php.ini on Mac? | ||
| ||
| When you're setting up a website or working on a server, sometimes you need to change settings in the php.ini file. If you're using a Mac, especially one with an M1 chip like I do, finding this file can seem tricky. But with a few simple steps, you can locate it quickly. You can easily find the location by phpinfo() if you don't know the exact location. Below is what I did to find php.ini.
STEP 1. create phpinfo.php
STEP 2. Find the location by grep
The result will be like below:
Above is what I tested on my Macbook M1.
In conclusion, finding the php.ini file on a Mac might sound technical, but it’s actually quite simple with the right approach. Whether you're a seasoned developer or just starting out, mastering these small tasks will greatly enhance your understanding and capabilities in managing web environments. | ||
| | ||
| |