In linux, php7 and php5 are run simultaneously, and php7, php5, and php7php5 are installed simultaneously.

Source: Internet
Author: User
Tags php 7 tutorial

In linux, php7 and php5 are run simultaneously, and php7, php5, and php7php5 are installed simultaneously.

Although php7 performs much better than php5,
It has been out for more than two years,
However, many old systems are developed using php5,
Directly transplanted to php7,
There will be many problems.

The old system is not developed by you,
So sometimes upgrading and modifying the old system,
Content cannot be implemented in a short time.

In this case, you need,
Install php7 and php5 at the same time,
Let the old system request php5,
New Service Request php7.

1. Install php7 and php5 simultaneously in linux
The installation of php5 is similar to that of php7,
For more information, see php7 installation in linux.

2. Install php7 and php5 at the same time,
2-1) do not install the two php files in the same directory.
In the php7 tutorial, install php7 to/usr/local/php,
When installing php5,
Do not overwrite the above content,
You can choose to install to/usr/local/php5

2-2) Use their respective php. ini configuration files
In the PHP 7 tutorial,
Php-fpm uses the/etc/php. ini configuration file,
Php5 can put the configuration file in the/usr/local/php5/etc/directory.

2-3) install their respective php extensions
Otherwise,
For example, although we have installed the memcache extension of php7 in php7,
But it cannot be used in php5,
The error message "memcache. so" is not found.
It must be installed separately.

3. Run php7 and php5 simultaneously in linux
In essence, two php-fpm instances are run in linux,
Note:
Both php-fpm Use php. ini and php-fmp.conf respectively.

In linux, besides php7 and php5,
It is also necessary for nginx to resolve different domain names to the corresponding php program.

Instructor Jia ziheng's public account's sexiness note
2php reply
View how to run php7 and php5 simultaneously in linux,
Understand nginx configuration parsing.

 

Related Article

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.