Linux hosts run multiple PHP versions simultaneously in a LNMP environment

Source: Internet
Author: User

The problem this time is that the customer site has been running multiple Web sites using PHP5.4, but the newly installed program needs to use PHP5.3.

From my previous experience, the replacement of the PHP version of the website may have unintended consequences. For example, before a customer Discuz forum is running PHP5.2 often 502 errors, so updated to PHP5.3 (PHP5.2 php-fpm function is in the form of patches, in the PHP5.3 is officially supported), the results of a forum with a plug-in only run in PHP5.2 version, fortunately this plugin also provides PHP5.3 version, otherwise the consequences will be very serious.
(Most mainstream PHP programs may have compatibility issues with different PHP versions, such as this example: http://www.yundaiwei.com/post/119.html)

If you are using the cloud host, most of the features of the snapshot, if the replacement version after the exception, it is easy to take advantage of snapshot recovery, unfortunately this is a standalone host, no snapshot available.

The original php5.4 installed in the/usr/local/php/, the newly added php5.3 installation directory for the/USR/LOCAL/PHP53/, the operation situation is as follows:

Different versions listen for different ports, such as:

Which version you need to use, specify the corresponding port in the Nginx configuration file.

If you need to install multiple Web site programs and the program needs a different version of PHP, you can refer to this article to implement the method.

Reprint: Http://www.yundaiwei.com/post/254.html?spm=5176.7189909.0.0.jH3eIY

Linux hosts run multiple PHP versions simultaneously in a LNMP environment

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.