Created
August 30, 2022 07:41
-
-
Save timogoosen/8a13501aa8e4fed5e8f4daaa8949ba35 to your computer and use it in GitHub Desktop.
Setup php7.4 Mac OSX alongside php7.3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
brew install shivammathur/php/[email protected] | |
export PATH="/opt/homebrew/opt/[email protected]/bin:$PATH" | |
pecl install igbinary | |
pecl install redis | |
pecl install imagick | |
brew services restart [email protected] | |
curl -sS https://getcomposer.org/installer | php -- --version=1.10.16 | |
sudo mkdir -p /usr/local/bin | |
sudo mv composer.phar /usr/local/bin/composer2 | |
sudo chmod u+x /usr/local/bin/composer2 | |
sudo chown root:wheel /usr/local/bin/composer2 | |
composer2 --version | |
If you run into any issues with extensions being loaded double then check this config file: | |
vim /opt/homebrew/etc/php/7.4/php.ini | |
You might see extensions loaded twice like: | |
extension=redis.so | |
extension=redis.so | |
Just comment those out |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Change port number here:
This is the line to change:
Then restart service:
Then: