How does macos-Mac upgrade its own PHP version?

Source: Internet
Author: User
For example, upgrade PHP5.5 to PHP5.6. For example, upgrade PHP5.5 to PHP5.6.

Reply content:

For example, upgrade PHP5.5 to PHP5.6.

Use brew to reinstall one.

You can just usebrewEasy to install. Of course, you can also download, compile, and install PHP 7 by yourself. you can try it.

wget http://.../php-7.0.2.tar.gztar zxvf php-7.0.2.tar.gz && cd php-7.0.2phpize./configure --prefix=/usr/local/php--mandir=/usr/share/man --infodir=/usr/share/info --with-apxs2=/usr/sbin/apxs--with-config-file-path=/usr/local/php/etc --enable-cli --with-curl --with-bz2--with-zlib --with-zlib-dir --with-mcrypt --enable-pdo --with-MySQL=mysqlnd--with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd --with-openssl --with-imap-ssl--enable-exif --enable-zip --enable-ftp --enable-soap --enable-sockets--with-curlwrappers --with-gettext --with-pear --enable-calendar--enable-mbstring --enable-bcmath --with-mhash --with-iconv-dir --with-libxml-dir--enable-safe-mode --enable-mbregex --enable-fpm --with-freetype-dir --with-gd--with-jpeg-dir --with-png-dir --with-xmlrpc --enable-gd-native-ttf--enable-xml --enable-sysvsem --enable-sqlite-utf8 --with-xsl--enable-zend-multibyte --with-pcre-regex --with-pgsql --with-pdo-pgsqlmake && sudo make installsudo cp php.ini-development /usr/local/php/php.ini

Install the Mac OSX developer environment and use homebrew to build PHP, Nginx, MySQL, Redis, Memcache... (LNMP Development Environment)

Find the PHP part to install it. it is valid for test!

After brew is installed, ln-s zookeeper/bin/php/usr/local/bin/php

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.