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 needhomebrew
Install 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 php7
Installation 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...