Use control + w to bring up the search function, and look for the below modules and make sure to uncomment them. To enable the modules, first, you need to find the modules that you want to enable. You need to enable (uncomment the line) and modify/update the configuration in nf file. Type sudo nano nf Enable the Modules and Configuration Type sudo cp nf and press enter (this step is optional if you want to keep the copy of the original config file.) Type brew install httpd Configure the Homebrew version Apache (nf file) Once you have Homebrew installed and properly set the export, the next step is to install the Apache using Homebrew. echo 'export PATH="/opt/homebrew/bin:$PATH"' > $HOME/.zshrcĬlose the Terminal and re-open a new Terminal window. Then type the below command and press Enter. Open the Terminal and type the below command and press Enter. If you are getting the above error, you have to export the path by issuing the following commands. When you try to issue a brew command, you might get the below error. To learn more about Homebrew, check out How to use Homebrew on macOS 12 Monterey Export the Homebrew Path Note: if you don’t have Command Line Tools for Xcode installed, the Homebrew installer will download and install the Command Line Tools for Xcode first then it will proceed to complete the installation of Homebrew to your system. Open Terminal and paste the above command. If you don’t see the above, follow the below steps to install the Homebrew in your system.Ĭopy the command of /bin/bash -c "$(curl -fsSL )" This means you have Homebrew already installed. Homebrew/homebrew-core (git revision 359f9f16171 last commit ) If returns something like: Homebrew 3.3.0 Check if you have Homebrew install or knowing the installed Homebrew version The first thing you need to do is install Homebrew to your macOS 12 Monterey system (if you have not installed Homebrew yet). Open Terminal and type: sudo apachectl stop Since we will not be using the macOS 12 built-in version of Apache, if your built-in Apache is running, issue the following command to stop the Apache service. Modify the nf to enable the PHP on Apache.Create Sites folder under your Username.Configure the Homebrew version Apache (nf file).Now you have full control on which PHP version to use. Start MAMP again and see that it now offers PHP 5.2 and 5.3 as they are 2 most recent versions that we didn’t rename. So if I want to use PHP 5.3, all I need to do is to rename the folders of PHP 5.4, 5.5 and 5.6 by adding an underscore at the beginning. MAMP will simply detect 2 most recent versions there and offer us to use them in the preference panel. There you will find the versions of PHP available. Quit MAMP if it’s running, go to the location of MAMP installation (I’m using Mac so it’s in Applications folder), then find bin/php folder. To test PHP compatibility, I needed to run a system using PHP 5.3 and was trying to figure out how.Ī colleague of mine figured out a very simple way to do that. However, the preference panel of MAMP only allows us to choose between running PHP 5.5.26 or 5.6.10. For me to manage digital development projects, the standard version is already sufficient. Professional developers might need some of the Pro features. Its standard version is free, available from The Pro version offers advanced features from unlimited virtual servers, running multi-PHP, one-click installation of popular CMS, dynamic DNS, SMTP and Apache switch. MAMP is a quick and easy tool to set up Apache, MySQL and PHP in our localhost computer.
0 Comments
Leave a Reply. |