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.

Create a custom WordPress taxonomy for posts and pages

Updated 16th August 2022

Sometimes when building a website using WordPress, the standard taxonomies Categories and Tags just aren’t enough, and you need to create more. Let’s learn how to create our own custom WordPress taxonomy. WordPress has made creating your own taxonomy easy, and you can even add your custom taxonomies to pages too. To accomplish this we

[UPDATED 2022] Change PHP version on Ubuntu, Linux

Updated 23rd August 2022

In this post, I will show you how to switch PHP version on Ubuntu, Linux. If you are developing on Windows, follow this guide to set up Windows Sub System for Linux. What will be covered: Change PHP version for Apache2 Change PHP version for Nginx Change PHP CLI version In this example, we will

List of programming languages used for Web Development

Updated 16th August 2022

There are a wide variety of programming languages that can be used for web development. Which one you choose depends on your preferences and needs. Some languages are better suited for certain tasks than others. In this post, we’ll take a look at some of the most popular languages used for web development. JavaScript PHP