Last active
September 30, 2020 04:20
-
-
Save rizkiheryandi/09c9cf5951cd043d896f32f18ab855d1 to your computer and use it in GitHub Desktop.
Update PHP on MacOS Catalina
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
| 1. Install php7.3 with brew | |
| brew install [email protected] | |
| 2. Use php7.3 on system | |
| brew link [email protected] | |
| 3. Set php7.3exe to default PHP | |
| echo 'export PATH="/usr/local/opt/[email protected]/bin:$PATH"' >> ~/.zshrc | |
| echo 'export PATH="/usr/local/opt/[email protected]/sbin:$PATH"' >> ~/.zshrc | |
| 4. Change php module on apache http.conf | |
| LoadModule php7_module /usr/local/opt/[email protected]/lib/httpd/modules/libphp7.so | |
| 5. Add below on apache httpd.conf | |
| <FilesMatch \.php$> | |
| SetHandler application/x-httpd-php | |
| </FilesMatch> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment