Rocky_Linux_8
Sponsored Link

PHP 7.3 : Install2021/08/02

 
Install PHP 7.3.
[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][e]    common [d] [i], 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

# if other versions are enabled, reset once and switch to the version

[root@dlp ~]#
dnf module -y reset php

[root@dlp ~]#
dnf module -y enable php:7.3
# specify PHP 7.3 and install

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

Dependencies resolved.
================================================================================
 Package       Arch    Version                                 Repository  Size
================================================================================
Upgrading:
 php-cli       x86_64  7.3.20-1.module+el8.4.0+414+2e7afcdd    appstream  3.0 M
 php-common    x86_64  7.3.20-1.module+el8.4.0+414+2e7afcdd    appstream  668 k
 php-fpm       x86_64  7.3.20-1.module+el8.4.0+414+2e7afcdd    appstream  1.6 M
 php-json      x86_64  7.3.20-1.module+el8.4.0+414+2e7afcdd    appstream   72 k
 php-mbstring  x86_64  7.3.20-1.module+el8.4.0+414+2e7afcdd    appstream  617 k
 php-xml       x86_64  7.3.20-1.module+el8.4.0+414+2e7afcdd    appstream  186 k
Installing module profiles:
 php/common

Transaction Summary
================================================================================
Upgrade  6 Packages
.....
.....

[root@dlp ~]#
php -v

PHP 7.3.20 (cli) (built: Jul  7 2020 07:53:49) ( NTS )
Copyright (c) 1997-2018 The PHP Group
Zend Engine v3.3.20, Copyright (c) 1998-2018 Zend Technologies

# verify to create test script

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

[root@dlp ~]#
php php_test.php

PHP 7.3 Test Page
Matched Content