Rocky_Linux_8
Sponsored Link

PHP 7.2 : Install2021/08/02

 
Install PHP 7.2.
[1] Confirm the current enabled version of PHP and Install it.
[root@dlp ~]#
dnf module list php

Rocky 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

Hint: [d]efault, [e]nabled, [x]disabled, [i]nstalled

# install PHP 7.2

[root@dlp ~]#
dnf module -y install php:7.2/common

Dependencies resolved.
================================================================================
 Package          Arch   Version                                Repo       Size
================================================================================
Installing group/module packages:
 php-cli          x86_64 7.2.24-1.module+el8.4.0+413+c9202dda   appstream 3.1 M
 php-common       x86_64 7.2.24-1.module+el8.4.0+413+c9202dda   appstream 660 k
 php-fpm          x86_64 7.2.24-1.module+el8.4.0+413+c9202dda   appstream 1.6 M
 php-json         x86_64 7.2.24-1.module+el8.4.0+413+c9202dda   appstream  72 k
 php-mbstring     x86_64 7.2.24-1.module+el8.4.0+413+c9202dda   appstream 579 k
 php-xml          x86_64 7.2.24-1.module+el8.4.0+413+c9202dda   appstream 187 k
Installing dependencies:
 httpd-filesystem noarch 2.4.37-39.module+el8.4.0+571+fd70afb1  appstream  37 k
 nginx-filesystem noarch 1:1.14.1-9.module+el8.4.0+542+81547229 appstream  23 k
Installing module profiles:
 php/common
Enabling module streams:
 httpd                   2.4
 nginx                   1.14
 php                     7.2

Transaction Summary
================================================================================
Install  8 Packages
.....
.....

[root@dlp ~]#
php -v

PHP 7.2.24 (cli) (built: Oct 22 2019 08:28:36) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.2.0, Copyright (c) 1998-2018 Zend Technologies

# verify to create test script

[root@dlp ~]#
echo "<?php echo 'PHP 7.2 Test Page'.\"\n\"; ?>" > php_test.php

[root@dlp ~]#
php php_test.php

PHP 7.2 Test Page
Matched Content