Hướng dẫn brew start php
In this post, we'll be looking at how to install PHP 8 on macOS Big Sur using Homebrew. By right the steps will also work for the previous macOS versions like Catalina and Mojave. Show Nội dung chính
Step 1: Install Homebrew
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" Step 2: Install PHP
brew install php If other versions may be preferred we can specify the PHP version and the code will look like the following. brew install [email protected] Step 3: The php.ini Config
/usr/local/etc/php/8.0/php.ini Step 4: Check if PHP is running
brew services list If PHP is not started we can then run the command below to start the service in the background. brew services start [email protected] Step 5: Checking PHP Version
php -v By now you will have PHP running on the background process and every time you logged in to the system it will start by default. Thanks for reading and have a good try.
General-purpose scripting language https://www.php.net/ License: PHP-3.01 Formula JSON API: Bottle JSON API: Formula code: Bottle (binary package) installation support provided for:
Current versions: Other versions:
Revision: 1 Keg-only Depends on:
Depends on when building from source:
To enable PHP in Apache add the following to httpd.conf and restart Apache: Finally, check DirectoryIndex includes index.php The
php.ini and php-fpm.ini file can be found in: Analytics (macOS):
Analytics (Linux):
|