![]() LoadModule php_module for #ServerName and add a new line below #ServerName ServerName localhost #PHP was deprecated in macOS 11 and removed from macOS 12 Search #PHP was deprecated, add a line below to add back PHP module. ![]() Make a copy of the nf file and edit the nf. We are going to use the pre-installed Apache, the configuration file for the Apache is in /etc/apache2. brew install the PHP version (this line may not needed). All commands are updated based on installation. I choose to install PHP 8.2 PHP 7.4 in order to be compatible with my existing applications that I'm running.Ī few months after installing PHP 7.4, homebrew stopped the support of PHP7.4 in its tap, I eventually has to re-do the whole process to install PHP8.2 (the latest available at homebrew at this update). With Homebrew, you can choose to install which version of PHP. Homebrew will be installed on /opt/homebrew/bin directory, it is therefore need to include the path in the $PATH by adding the follow lines into the. To download Homebrew, run /bin/bash -c "$(curl -fsSL )" Surprisingly for past 10 years of using my previous MacBook Pro 2011, I never felt the need to use Homebrew, so the first step is to install Homebrew. Install HomebrewĪlthough it is possible to download the PHP source code and build it on the machine, but it is much easier to install it using Homebrew. Most of the online tutorials or walk-through suggesting of installing the complete pre-packaged Appache-PHP-MYSQL stacks, but I already has the MySQL up and running, and the built-in Apache 2.4 is okay for me, so I only need to install PHP. In case you need PHP, you will have to install it yourself. However Apple removed PHP since macOS Monterey 12. This went well for most of applications, including my MSQL installation and all the databases, except for PHP.Īpple pre-packaged Apache 2.4 in macOS Montery 12. For those that are not supported by by Apple Silicon, the Rosetta 2 ( ) helps to translate the older version so that it will be able to run on Apple Silicon. So what I did is do a full backup-and-restore to move all my data and applications over to the new MacBook Pro, and delete those applications that has the newer Apple Silicon version and then install the new version. Most of the software that I'm using already has the version that supports Apple Silicon. Install PHP on macOS MontereyĪfter 10 years of using my MacBook Pro 2011 edition, I finally bought an Macbook Pro M1 recently. I recently went through the process of install PHP on macOS Monterey on my MackBook Pro M1 (Apple Silicon), the installation of PHP itself is easy, the codesigning of the PHP module took a little while to figuring out, I thought it would be a good idea to document the walk-through on how I did it.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |