Because the program running environment is required, you have to use PHP5.2 or earlier versions.
The following two methods are provided to install PHP5.2:
Operating system: CentOS 5.8 64-bit (Alibaba cloud space)
1. Download the source code from the official website and compile and install it.
Download Address: http://museum.php.net/php2/
Compile the installation method. Decompress the package and read the README text file.
2. Install php5.2.17 through a third-party yum source
Reference Method: https://webtatic.com/packages/php53/
1) run the rpm-qa | grep php command to view the installed php software package.
If yes, you can use yum-y remove php * to uninstall it.
2) install the yum Library Information rpm-Uvh http://mirror.webtatic.com/yum/centos/5/latest.rpm
After the installation is complete, the webtatic. repo configuration file will be generated in/etc/yum. repos. d.
3) edit/etc/yum. conf to exclude versions 5.3, 5.4, 5.5, and 5.6.
Add this line: exclude = * 5. 3. *, * 5. 3. *, * 5. 4. *, * 5. 5. *, * 5. 6 .*
4) install php
Yum-enablerepo = webtatic install php-mysql php-xml php-gd php-mbstring php-cli
Or
Yum-enablerepo = webtatic update php-mysql php-xml php-gd php-mbstring php-cli
5) run rpm-qa | grep php or php-v to check whether the php version is php5.2.