Find php.ini on Apple Silicon installed with Homebrew

By Dillon Smart · · · 0 Comments

Are you having trouble finding your php.ini file which was installed locally with Homebrew? Packages installed with Homebrew can be installed in different locations making it hard to find, especially if you are on new Apple Mac running Apple’s Silicon chips.

Here, I will show you home to locate your locally installed php.ini file installed via Homebrew.

Where are Homebrew packages installed?

After looking around online for some time, you may have stumbled across Stack Overflow posts stating that the packages are installed within the /usr/local/opts directory. However, this isn’t always the case.

On MacOS on Apple Silicon chips, Homebrew packages can be found in the /opt/homebrew directory.

cd /opt/homebrew/Cellar

How to find php.ini location

One of the easiest ways to find your php.ini file is to runphp from the terminal, like so:

php -r "phpinfo();" | grep php.ini

This will output the exact location of yuour current PHP versions php.ini file.

Find your php.ini on MacOS


0 Comment

Was this helpful? Leave a comment!

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Pixel Tracking in PHP

Updated 16th August 2022

When creating email campaigns, it’s important to know how many recipients actually opened your email. This information can help you determine if your efforts are working or if it’s time to change your strategy. Most mail champaign tools such as Mailchimp and SendInBlue use a technique called Pixel Tracking. In this post, you will learn

WSL vs Dual Boot speed test

Updated 16th August 2022

In this experiment, I will be using WSL2 running Ubuntu 20.04 and Ubuntu 20.04 dual-booted on the same Dell XPS. Is there a noticeable difference? Follow along for the results of the WSL vs Dual Boot speed test. If you are like me and use different development environments a lot, you may find the results

How to use Microsoft Graph API with Laravel

Updated 1st January 2024

Microsoft Graph is a gateway to data and intelligence within Microsoft 365. Microsoft Graph is great to build apps for organizations and consumers using the vast amount of data stored in Microsoft 365. In this post, we are going to integrate with Microsoft Graph API in Laravel to get all users assigned to your tenant.