I was trying to upgrade php 5.4 to 7 on my CentOS 7 using this toutorial:
https://www.digitalocean.com/community/tutorials/how-to-upgrade-to-php-7-on-centos-7
And I made this:
sudo yum remove php-cli mod_php php-common
[erased everything – done]
sudo yum install mod_php70u php70u-cli php70u-mysqlnd
“nothing to do”
All my websites are: 502 Bad Gateway / nginx
In Plesk I see this:
New configuration files for the Apache web server were not created due to the errors in configuration templates:
[Sun Jul 10 20:52:21.734150 2016] [so:warn] [pid 11833] AH01574: module actions_module is already loaded, skipping
[Sun Jul 10 20:52:21.735241 2016] [so:warn] [pid 11833] AH01574: module headers_module is already loaded, skipping [Sun Jul 10 20:52:21.735398 2016] [so:warn] [pid 11833] AH01574: module logio_module is already loaded, skipping
[Sun Jul 10 20:52:21.735945 2016] [so:warn] [pid 11833] AH01574: module suexec_module is already loaded, skipping AH00526: Syntax error on line 33 of /etc/httpd/conf/plesk.conf.d/roundcube.conf: Wrapper /var/www/cgi-bin/cgi_wrapper/cgi_wrapper cannot be accessed: (2)No such file or directory . Detailed error descriptions were sent to you by email. Please resolve the issues and click here to generate broken configuration files once again or here to generate all configuration files. See the details in Configuration Troubleshooter
Please help.
2
Answers
If you are using NGINX. as web server this works. instructions to apache are very similar. the part that changes is the last part.
I had to set up servers with NGINX/APACHE that support and array of PHP versions (from 5.3 to php7).
the server that we currently use is NGINX (has better performance and lower memory footprint)
In order to have multiple versions I compile PHP from the source and make listen the php process in a 127.0.0.1:port
you will need to install all depedencies in order to compile PHP from source:
Then you will need to download the desired php version.
Dowload PHP7 into the /opt/ folder of the server.
http://php.net/get/php-7.0.8.tar.gz/from/a/mirror
(In the server, I prefer to download and compile PHP in the /opt/ folder.)
Extract the source:
cd into the php folder:
Configure php.
then:
Then create the NGINX configuration file.
Finally:
And you are ready to go…
hope this helps.
Detailed info: https://github.com/dferrans/Centos-7-nginx-stack-multiple-php
Have you already install all the RPMs? If so, try this: