Sample Header Ad - 728x90

How to install PHP on CentOS has preinstalled Apache HTTPD?

0 votes
2 answers
1439 views
I'm using CentOS 7. I wanted to install PHP 7 so I used remi-php (latest PHP version of yum is 5.4). Since the HTTPD version of yum is too old, I compiled the latest HTTPD version from the source code. HTTPD compilation goes perfectly, however, when I try to install remi-php using the following command: yum --enablerepo=remi-php71 install php php-cli php-intl php-mbstring php-mcrypt php-mysqlnd To install php, yum will also install the old version of httpd (although I have compiled and used the latest HTTPD version). If I continue with the installation, my HTTPD will throw an error (and won't start), but if I don't continue with the installation, I won't have the php*.so file and apache won't parse the .php files. So, how do I install php without affecting the Apache HTTPD that I have compiled before? I don't want my server to have two instances of Apache HTTPD at the same time and may have problems in the future. Your answer given will be very helpful to me. I will appreciate your answer.
Asked by Tần Quảng (25 rep)
Jul 28, 2021, 05:53 PM
Last activity: Jul 29, 2021, 01:46 PM