Weak question: How can I change the php version?

Source: Internet
Author: User
My version is 5.6. configure & amp; make & amp; makeinstall does not have -- prefix, but is in version 7. configure -- prefixpath & amp; make & amp; makeinstall... my version 5.6
./Configure & make install
No -- prefix =

In version 7
./Configure -- prefix = path & make install

At this time, how can I make the default php be the php under path?

Reply content:

My version 5.6
./Configure & make install
No -- prefix =

In version 7
./Configure -- prefix = path & make install

At this time, how can I make the default php be the php under path?

Directly create a soft connection/path/bin/php->/usr/local/bin

1,which php
2. If it is bin/php, delete it. If it is sbin/php-fpm, delete it.
3,ln -s /path/bin/php /bin/php
ln -s /path/sbin/php-fpm /sbin/php-fpm

Open httped. conf under apache
Find this sentence
LoadModule php5_module local/Cellar/php56/5.6.20/libexec/apache2/libphp5.so
If you have installed Multiple php versions locally
Sudo find/-name libphp5.so
Find this directory.
LoadModule php5_module libphp5.so path

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.