How to upgrade the built-in SegmentFault

Source: Internet
Author: User
Tags macbook
1. how can I upgrade the php version that comes with macbook? 1. how can I upgrade the php version that comes with macbook?

Reply content:

1. how can I upgrade the php version that comes with macbook?

No need to upgrade the built-in php
You only needhomebrewInstall a new php version and add it to the environment variable $ PATH. multiple versions can coexist.

If you are familiar with Linux, go to the php.net official website and compile and install it;
Of course, since the subject asks this question, it is not very familiar with Linux operations for the time being;
Homebrew can also be used upstairs, but the following describes a simple and humane method;

Open the terminal and execute the following command;

curl -s http://php-osx.liip.ch/install.sh | bash -s 7.0

Then I will go to a cup of coffee and upgrade it to php7 after a short wait;
What? You can't believe it's that simple?
Or do you want to upgrade to another version?
Give you a URL. thank you for reading it;
Http://php-osx.liip.ch/#install

Friendly reminder: upgrading may fail if the character is poor without turning over the wall;
Okay; I admit; I am the one with poor character;

Download and install it by yourself. I installed the php7 command as follows:

# Download wget http://cn2.php.net/get/php-7.0.2.tar.gz/from/this/mirror# unzip tar-zxvf php-7.0.2.tar.tar.gzcd php-7.0.7.tar # enable the corresponding settings. /buildconf -- force. /configure -- prefix =/usr/local/php7 -- with-apxs2 =/usr/sbin/apxs -- enable-fpm -- with-fpm-user = www -- with-fpm-group = www -- with-mysqli -- with-pdo-mysql -- with-iconv-dir -- with-freetype-dir -- with-jpeg-dir -- with-png-dir -- with-zlib -- -libxml-dir =/usr -- enable-xml -- disable-rpath -- enable-bcmath -- enable-shmop -- enable-sysvsem -- enable-inline-optimization -- with-curl -- enable-xml- mbregex -- enable-mbstring -- with-mcrypt -- enable-ftp -- with-gd -- enable-gd-native-ttf -- with-openssl -- with-mhash -- enable-pcntl -- enable- sockets -- with-xmlrpc -- enable-zip -- enable-soap -- without-pear -- with-gettext -- disable-fileinfo -- enable-maintainer-zts # compile and install make & sudo make install

Or you can directly usebrew install php7Installation is also possible. If you encounter a specific error, go to Google/Baidu or continue the discussion. Hope to help you

Amway liip

Will not upgrade method... But just install a new one...

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.