I am on CentOS 8 with default php version 7.2.24 and i want to install at least php 7.3
At first i installed remi-release-8.rpm (with php 7.3 , 7.4 , 8.0) and here was info from console:
yum list installed | grep -i php
*php-cli.x86_64 7.2.24-1.module_el8.2.0+313+b04d0a66 @AppStream *
*php-common.x86_64 7.2.24-1.module_el8.2.0+313+b04d0a66 @AppStream *
*php-fpm.x86_64 7.2.24-1.module_el8.2.0+313+b04d0a66 @AppStream *
*php-gd.x86_64 7.2.24-1.module_el8.2.0+313+b04d0a66 @AppStream *
*php-json.x86_64 7.2.24-1.module_el8.2.0+313+b04d0a66 @AppStream *
*php-mbstring.x86_64 7.2.24-1.module_el8.2.0+313+b04d0a66 @AppStream *
*php-mysqlnd.x86_64 7.2.24-1.module_el8.2.0+313+b04d0a66 @AppStream *
*php-opcache.x86_64 7.2.24-1.module_el8.2.0+313+b04d0a66 @AppStream *
*php-pdo.x86_64 7.2.24-1.module_el8.2.0+313+b04d0a66 @AppStream *
*php-pear.noarch 1:1.10.5-9.module_el8.2.0+313+b04d0a66 @AppStream *
*php-process.x86_64 7.2.24-1.module_el8.2.0+313+b04d0a66 @AppStream *
*php-xml.x86_64 7.2.24-1.module_el8.2.0+313+b04d0a66 @AppStream *
*php-xmlrpc.x86_64 7.2.24-1.module_el8.2.0+313+b04d0a66 @AppStream *
*php73-libzip.x86_64 1.7.3-2.el8.remi @remi-safe *
*php73-php-cli.x86_64 7.3.25-1.el8.remi @remi-safe *
*php73-php-common.x86_64 7.3.25-1.el8.remi @remi-safe *
*php73-php-fpm.x86_64 7.3.25-1.el8.remi @remi-safe *
*php73-php-gd.x86_64 7.3.25-1.el8.remi @remi-safe *
*php73-php-json.x86_64 7.3.25-1.el8.remi @remi-safe *
*php73-php-mysqlnd.x86_64 7.3.25-1.el8.remi @remi-safe *
*php73-php-pdo.x86_64 7.3.25-1.el8.remi @remi-safe *
*php73-php-pecl-zip.x86_64 1.19.2-1.el8.remi @remi-safe *
*php73-php-xml.x86_64 7.3.25-1.el8.remi @remi-safe *
*php73-runtime.x86_64 2.0-1.el8.remi @remi-safe *
*php74-libzip.x86_64 1.7.3-2.el8.remi @remi-safe *
*php74-php-cli.x86_64 7.4.13-2.el8.remi @remi-safe *
*php74-php-common.x86_64 7.4.13-2.el8.remi @remi-safe *
*php74-php-fpm.x86_64 7.4.13-2.el8.remi @remi-safe *
*php74-php-gd.x86_64 7.4.13-2.el8.remi @remi-safe *
*php74-php-json.x86_64 7.4.13-2.el8.remi @remi-safe *
*php74-php-mysqlnd.x86_64 7.4.13-2.el8.remi @remi-safe *
*php74-php-pdo.x86_64 7.4.13-2.el8.remi @remi-safe *
*php74-php-pecl-zip.x86_64 1.19.2-1.el8.remi @remi-safe *
*php74-php-xml.x86_64 7.4.13-2.el8.remi @remi-safe *
*php74-runtime.x86_64 1.0-3.el8.remi @remi-safe *
*php80-libzip.x86_64 1.7.3-2.el8.remi @remi-safe *
*php80-php-cli.x86_64 8.0.0-2.el8.remi @remi-safe *
*php80-php-common.x86_64 8.0.0-2.el8.remi @remi-safe *
*php80-php-fpm.x86_64 8.0.0-2.el8.remi @remi-safe *
*php80-php-gd.x86_64 8.0.0-2.el8.remi @remi-safe *
*php80-php-mysqlnd.x86_64 8.0.0-2.el8.remi @remi-safe *
*php80-php-pdo.x86_64 8.0.0-2.el8.remi @remi-safe *
*php80-php-pecl-zip.x86_64 1.19.2-1.el8.remi @remi-safe *
*php80-php-xml.x86_64 8.0.0-2.el8.remi @remi-safe *
*php80-runtime.x86_64 1.0-3.el8.remi @remi-safe *
wbm-php-pear.noarch 2:1.6-1 @virtualmin-universal
dnf module list php
Last metadata expiration check: 2:48:56 ago on Tue Dec 29 03:12:50 2020.
CentOS-8 - AppStream
*Name Stream Profiles Summary *
php 7.2 [d][e] common [d], devel, minimal PHP scripting language
php 7.3 common [d], devel, minimal PHP scripting language
php 7.4 common [d], devel, minimal PHP scripting language
CentOS Linux 8 - AppStream
*Name Stream Profiles Summary *
php 7.2 [d][e] common [d], devel, minimal PHP scripting language
php 7.3 common [d], devel, minimal PHP scripting language
php 7.4 common [d], devel, minimal PHP scripting language
Remi’s Modular repository for Enterprise Linux 8 - x86_64
*Name Stream Profiles Summary *
php remi-7.2 common [d], devel, minimal PHP scripting language
php remi-7.3 common [d], devel, minimal PHP scripting language
php remi-7.4 common [d], devel, minimal PHP scripting language
php remi-8.0 common [d], devel, minimal PHP scripting language
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
But only 7.2.24 was working fine. If i switched to higher versions, then forum was not working (HTTP ERROR 500).
Then i decided to remove php and i run: yum -y remove php*
It removed also 7.2.24 (only working version) and few hours later (after trying many many tutorials) i am writing here, as i still can’t get php to work and i can’t understand what is wrong.
Last tutorila i followed to install php 7.3 and 7.4:
Some info about current status
yum list installed | grep -i php
*php73.x86_64 2.0-1.el8.remi @remi-safe *
*php73-php-cli.x86_64 7.3.25-1.el8.remi @remi-safe *
*php73-php-common.x86_64 7.3.25-1.el8.remi @remi-safe *
*php73-php-fpm.x86_64 7.3.25-1.el8.remi @remi-safe *
*php73-php-json.x86_64 7.3.25-1.el8.remi @remi-safe *
*php73-runtime.x86_64 2.0-1.el8.remi @remi-safe *
*php74.x86_64 1.0-3.el8.remi @remi-safe *
*php74-php-cli.x86_64 7.4.13-2.el8.remi @remi-safe *
*php74-php-common.x86_64 7.4.13-2.el8.remi @remi-safe *
*php74-php-fpm.x86_64 7.4.13-2.el8.remi @remi-safe *
*php74-php-json.x86_64 7.4.13-2.el8.remi @remi-safe *
*php74-runtime.x86_64 1.0-3.el8.remi @remi-safe *
wbm-php-pear.noarch 2:1.6-1 @virtualmin-universal
dnf module list php
Last metadata expiration check: 0:28:29 ago on Tue Dec 29 10:03:32 2020.
CentOS-8 - AppStream
*Name Stream Profiles Summary *
php 7.2 [d] common [d], devel, minimal PHP scripting language
php 7.3 common [d], devel, minimal PHP scripting language
php 7.4 common [d], devel, minimal PHP scripting language
CentOS Linux 8 - AppStream
*Name Stream Profiles Summary *
php 7.2 [d] common [d], devel, minimal PHP scripting language
php 7.3 common [d], devel, minimal PHP scripting language
php 7.4 common [d], devel, minimal PHP scripting language
Remi’s Modular repository for Enterprise Linux 8 - x86_64
*Name Stream Profiles Summary *
php remi-7.2 common [d], devel, minimal PHP scripting language
php remi-7.3 [e] common [d], devel, minimal PHP scripting language
php remi-7.4 common [d], devel, minimal PHP scripting language
php remi-8.0 common [d], devel, minimal PHP scripting language
Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled
php73 -v
*PHP 7.3.25 (cli) (built: Nov 24 2020 11:10:55) ( NTS ) *
*Copyright © 1997-2018 The PHP Group *
Zend Engine v3.3.25, Copyright © 1998-2018 Zend Technologies
By the way, before removing php i could check php by writing simply: php -v
Now it returns: php: command not found
In Re-check configuration:
-
SuExec cannot be used to run PHP scripts in CGI or FCGId modes : The Suexec command on your system is configured to only run scripts under /var/www, but the Virtualmin virtual server home directory is /home. CGI scripts run as domain owners will not be executed.
-
The following PHP versions are available : 7.3.25 (/bin/php73-cgi), 7.4.13 (/bin/php74-cgi)
-
The following PHP execution modes are available : fpm
-
The following PHP-FPM versions are available on this system : 7.3.25 (php73-php-fpm) 7.4.13 (php74-php-fpm)
Also on Dashboard in Server Status i can see that PHP-FPM 7.3.25 Server and
PHP-FPM 7.4.13 Server is running.
By the way in some tutorials was something about Nginx and eple. Are they required for PHP to work?