macos - How to perform a major version upgrade of PHP that comes with Mac?

WBOY
Release: 2016-07-06 13:53:21
Original
1561 people have browsed it

For example, PHP5.5 is upgraded to PHP5.6.

Reply content:

For example, PHP5.5 is upgraded to PHP5.6.

Just reinstall it with brew

You can just use brew to install it quickly and easily as the people above said. Of course, you can also download, compile and install it yourself. I have installed php7 before and it is OK. You can try it

<code>wget http://.../php-7.0.2.tar.gz
tar zxvf php-7.0.2.tar.gz && cd php-7.0.2
phpize
./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-pgsql
make && sudo make install
sudo cp php.ini-development /usr/local/php/php.ini</code>
Copy after login

Newly install the Mac OSX developer environment and use homebrew to build PHP, Nginx, MySQL, Redis, Memcache... (LNMP development environment)

Just find the PHP part and install it. It works in my own test!

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

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!