Using Packages

There are a few pre-packaged and pre-compiled versions of PHP for Mac OS X. This can help in setting up a standard configuration, but if you need to have a different set of features (such as a secure server, or a different database driver), you may need to build PHP and/or your web server yourself. If you are unfamiliar with building and compiling your own software, it's worth checking whether somebody has already built a packaged version of PHP with the features you need.

The following resources offer easy to install packages and precompiled binaries for PHP on Mac OS:

Коментарии

Автор:
Granted, this is not a "package", but I prefer to use phpbrew, as it allows me to install as many versions of PHP as I want for testing or whatever.

https://github.com/phpbrew/phpbrew
2021-12-04 20:39:08
http://php5.kiev.ua/manual/ru/install.macosx.packages.html
Автор:
You can use Laravel valet, what is included PHP, Nginx, DNSMasq and a lot of things for easy developing. (https://laravel.com/docs/8.x/valet)
2021-12-31 01:01:31
http://php5.kiev.ua/manual/ru/install.macosx.packages.html
Valet requires macOS and Homebrew. Before installation, you should make sure that no other programs such as Apache or Nginx are binding to your local machine's port 80.

you need to install brew anyway
2022-01-06 19:11:17
http://php5.kiev.ua/manual/ru/install.macosx.packages.html
Автор:
remember after step 1 installing homebrew to run these two commands, one at a time in the terminal window - where xxxxx is the name of the current profile - (who you are logged in as)

echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/xxxxx/.zprofile
 
eval "$(/opt/homebrew/bin/brew shellenv)"

Only then will you be able to run step 2 brew...
2022-08-16 14:07:36
http://php5.kiev.ua/manual/ru/install.macosx.packages.html
Автор:
@marc_cole Note that phpbrew (https://github.com/phpbrew/phpbrew) requires you already have some version of PHP on your system. This is because phpbrew itself is written in php. And recent versions of macOS no longer come with php included.

So phpbrew isn't really an alternative since you still need to use homebrew or something else to install php in the first place.
2022-10-08 02:09:58
http://php5.kiev.ua/manual/ru/install.macosx.packages.html
Note that with recent versions of macos, you'll have to code-sign the PHP module installed by

brew install php

before Apache will load and run it.

Instructions for this can be found at https://blog.phusion.nl/2020/12/22/future_of_macos_apache_modules/
2023-05-21 19:34:51
http://php5.kiev.ua/manual/ru/install.macosx.packages.html

    Поддержать сайт на родительском проекте КГБ