Mac Upgrade php7.2

Source: Internet
Author: User
Tags install php

Find many Mac upgrades on the web in PHP steps, but all too complex, and there are all kinds of problems

Write down my easiest way to upgrade

Mac with php5.6 version, to upgrade to php7.2 steps below 1, download homebrew

Https://brew.sh/index_zh-cn
2. Brew Installation PHP

Enter the following in the terminal, do not specify the PHP version installed, will automatically upgrade to the latest version, and Brew will automatically update

Brew Install PHP
3, modify Apache

After downloading PHP, the terminal inside actually will prompt you to change how to do, completely does not need to follow the network other steps to be so complex


1, open Spotlight, into the/etc/apache2/httpd.conf

Add the two lines of terminal hint, red box callout

2, to your Apache default directory/library/webserver/documents below to add a info.php file

<?php
phpinfo ();
? >

3, start Apache

sudo apachectl start

Http://localhost/info.php Open



When you see this page, it means you're successful.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.