Skip to content
This repository has been archived by the owner on Feb 9, 2023. It is now read-only.

Latest commit

 

History

History
56 lines (34 loc) · 1.66 KB

File metadata and controls

56 lines (34 loc) · 1.66 KB

Installation for macOS - PHP

Documentation > Installation for macOS > PHP

Table of Contents

  1. Installation on macOS
  2. Configuration

Stack Requirement

Install and configure the following services

1. Installation on macOS

NOTE: If you have existing PHP installations via Homebrew, you need to first cleanup your setup with our Upgrading Homebrew cleanup guide before continuing with this section.

Remember only PHP 7.3 through 8.x are officially supported by Homebrew, but these also have to be built which is pretty slow.

PHP 8.0 has just been released and you are able to install it, but it might take some time for compatible PHP modules are fully available.


Installation PHP versions

brew install php@7.3
brew install php@7.4

The versions of PHP installed by Homebrew will be in the directory /usr/local/etc/php.


Installation PHP extensions

To install an PHP extension for a specific version with PECL.

Replace <PHP_VERSION> by your version [7.3|7.4|<MAJOR.MINOR>]

Replace <PHP_EXTENSION> by your desired extension

$(brew --prefix php@<PHP_VERSION>)/bin/pecl install <PHP_EXTENSION>

2. Configuration

Follow instruction here: Service Configuration - PHP