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

PHP

0 Comment

Was this helpful? Leave a comment!

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

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

PHP Variable Variables

Updated 1st June 2022

In PHP, it is sometimes necessary to have variables that have variable names. Traditionally, a variable is given a name and a value is given to the variable like so: $foo = 'bar'; A Variable Variable, or Double Dollar Variable, gets its name from the value of another variable like so: $foo = 'bar'; $$foo

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