![]() ![]() Many thanks to the guys at , who wrote a great blog series on this topic. Installing PHP extensions and services with PECL and Homebrew.Install and configure multiple PHP versions on Mojave with Homebrew.Install and configure Apache 2 on Mojave with Homebrew.Choosing a local PHP development setup on Mojave.In the next episode we will install the necessary and PHP extensions. Should you ever need to stop or restart it by hand, use one of the common brew services commands: brew services stop mariadb Since mariadb is a service, it will start automagically on reboot. We will install mariadb with Homebrew: brew updateĪfter installing mariadb, make sure to change the mysql password: /usr/local/bin/mysql_secure_installation< To upgrade other PHP versions, first switch and then repeat the upgrade process. When you want to update the currently active PHP version through Homebrew, do: brew update Now, you can switch between PHP versions from the command line. If they have not, you need to add them manually. To quickly check your local PHP install, create an index.php file inside your localhost webroot (in my case Users/joostvanveen/htdoc) and make it echo your phpinfo: /usr/local/bin/sphpĬheck if the paths /usr/local/bin and /usr/local/sbin have been added to your bash profile file ( ~/.profile, ~/.bash_profile, or ~/.zshrc). #LoadModule php5_module php7_module php7_module php7_module php7_module add index.php as the default file to load in a directory. Uncomment the currently running version and comment out the other versions. Open file /usr/local/etc/httpd/nf and add a LoadModule statement for every PHP version you have installed under the existing LoadModule lines. Now we need to load all PHP versions as Apache modules. bash_profile is reloaded.Ĭheck the latest installed PHP version is actually running. brew install install install install install first close your terminal windows so your. Later, we will install a command line tool to easily witch between versions. If you need to install a PHP version that is already end of life, like PHP 7.0, make sure to run this tap first: brew tap exolnet/homebrew-deprecated Install multiple PHP versions through Homebrewīu default, Homebrew only supports official non-deprecated PHP versions. # Check that no deprecated Homebrew PHP packages are left # brew uninstall -force php70 php70-apcu php70-opcache php70-xdebug php70-yaml # Check if you have old deprecated Homebrew PHP versions and extensions installedīrew uninstall -force php56 php56-apcu php56-opcache php56-xdebug php56-yaml ![]() If yu have any PHP versions installed from through homebrew from before March 2018, make sure to remove them. As of March 2018, PHP is part of the homebrew core. My development setup part 3: Install and configure multiple PHP versions on Mojave with Homebrew Uninstall any deprecated Homebrew PHP versions and extensionsīefore March 2018, Homebrew installed PHP as a Homebrew package. test domains, multiple PHP versions that I can easily switch between, Redis, Opcache, Image Magick, Blackfire and more. Links to the other blogs in this series are at the bottom. In this blog series, I take you through the steps I took to create my new setup: a blazingly fast and flexible setup with Apache, automatic DNS setup for. ![]()
0 Comments
Leave a Reply. |