Difference between revisions of "Phpinfo page"

From TheBestLinux.com
Jump to navigation Jump to search
(Created page with "* Using the text editor of your choice(I prefer vi/vim, but newbies like pico), create a new file named phpinfo.php, or anything you want, as long as it ends with the .php fil...")
 
 
(7 intermediate revisions by the same user not shown)
Line 1: Line 1:
* Using the text editor of your choice(I prefer vi/vim, but newbies like pico), create a new file named phpinfo.php, or anything you want, as long as it ends with the .php filename extension, in the root directory of your web server.  On Linux, that us usually /var/www/html.  Within that file, enter these three lines of text:
+
== '''PHP - Website scripting language used to create dynamic websites''' ==
 +
 
 +
=== '''Custom PHP Distributions - 3rd Party''' ===
 +
There are a number of custom PHP distributions out there, usually created for specific use-cases.  Others are great when you need a newer version of PHP that what is naitively available for your current version of your Linux distribution.
 +
 
 +
For instance, the new website app you want to use on your website requires PHP 8.2, but your version of Linux only has PHP 7.4 available through it's normal package repository.  There are third-party custom PHP distributions created by these developers that allow you to install the newer version of PHP and it's supported accessories and tools.
 +
<br /><br />
 +
 
 +
=== '''Upgrading Third-Party Custom PHP Distribution Repository Configurations''' ===
 +
As new software packages and tools become available, so do thier PHP requirements.  What once needed PHP 7.4 to run properly now needs PHP version 8.2 to run the new version of the package required.  In order to do this properly and keep the system "clean", configured "correctly", you should follow the "standard process" for the particulare package you are dealing with, as all are different, depending on what you are wanting to do in the end.
 +
 
 +
==== '''PHP Upgrade - Real-World Urgent Upgrade Required!''' ====
 +
I currently encounreded a real-world urgent upgrade requirement for the currently installed version of PHP on my Fedora 36 workstation laptop with this exact same scenario.  I had installed the YUM/DNF PHP repository configuration files for the 3rd-party "Remi php 7.4" packages long ago, when it was the newest available version, and Fedora 36 didn't support any PHP higher than 5.x at the time.  Long since then, I have begun to get warning messages on that laptop aobut the outdated and extremely "vulnerable" PHP version 7.4 installed, and that I should upgrade immediatelly.
 +
<br /><br />
 +
 
 +
I had to figure out how to upgrade the Remi repository configuration files to support the latest version of PHP currently available through Remi, and went through this process:
 +
 
 +
<pre style="color:blue">
 +
[root@fc36.dawgland.com:~]# dnf module reset php
 +
Fedora 36 - x86_64 - Updates                    8.5 kB/s | 4.5 kB    00:00   
 +
Fedora Modular 36 - x86_64 - Updates            7.4 kB/s | 2.3 kB    00:00   
 +
Dependencies resolved.
 +
================================================================================
 +
Package          Architecture    Version            Repository        Size
 +
================================================================================
 +
Resetting modules:
 +
php                                                                         
 +
 
 +
Transaction Summary
 +
================================================================================
 +
 
 +
Is this ok [y/N]: y
 +
Complete!
 +
</pre>
 +
<br /><br />
 +
 
 +
Next, you need to enable the desired release you want/need to use.  In my case, I want to use/enable the latest/greatest, PHP version 8.2, so ran this command next:
 +
<pre style="color:blue">
 +
[root@fc36.dawgland.com:~]# dnf module enable php:remi-8.2
 +
Last metadata expiration check: 0:06:35 ago on Wed 01 Nov 2023 08:32:58 PM PDT.
 +
Dependencies resolved.
 +
================================================================================
 +
Package          Architecture    Version            Repository        Size
 +
================================================================================
 +
Enabling module streams:
 +
php                                remi-8.2                                 
 +
 
 +
Transaction Summary
 +
================================================================================
 +
 
 +
Is this ok [y/N]: y
 +
Complete!
 +
</pre>
 +
 
 +
<br /><br />
 +
 
 +
Then, to implement and install/upgrade all of the PHP packages to release/version 8.2, run this command, again, as the "root", aka, superuser:
 +
<br />
 +
<pre style="color:blue">
 +
[root@fc36.dawgland.com:~]# dnf update php\*
 +
Last metadata expiration check: 0:06:55 ago on Tue 31 Oct 2023 11:30:11 AM PDT.
 +
Dependencies resolved.
 +
================================================================================
 +
Package              Arch    Version                      Repository    Size
 +
================================================================================
 +
Installing:
 +
php-pecl-xmlrpc      x86_64  1.0.0~rc3-2.fc36.remi.8.2    remi-modular  65 k
 +
    replacing  php-xmlrpc.x86_64 7.4.33-8.fc36.remi
 +
Upgrading:
 +
php-bcmath            x86_64  8.2.9-2.fc36.remi            remi-modular  47 k
 +
php-cli              x86_64  8.2.9-2.fc36.remi            remi-modular  5.4 M
 +
php-common            x86_64  8.2.9-2.fc36.remi            remi-modular  842 k
 +
    replacing  php-json.x86_64 7.4.33-8.fc36.remi
 +
php-dba              x86_64  8.2.9-2.fc36.remi            remi-modular  51 k
 +
php-fpm              x86_64  8.2.9-2.fc36.remi            remi-modular  1.9 M
 +
php-gd                x86_64  8.2.9-2.fc36.remi            remi-modular  62 k
 +
php-geos              x86_64  1.0.0-24.fc36.remi.8.2      remi-modular  60 k
 +
php-gmp              x86_64  8.2.9-2.fc36.remi            remi-modular  49 k
 +
php-imap              x86_64  8.2.9-2.fc36.remi            remi-modular  69 k
 +
php-intl              x86_64  8.2.9-2.fc36.remi            remi-modular  233 k
 +
php-ldap              x86_64  8.2.9-2.fc36.remi            remi-modular  64 k
 +
php-lz4              x86_64  0.4.3-1.fc36.remi.8.2        remi-modular  18 k
 +
php-mbstring          x86_64  8.2.9-2.fc36.remi            remi-modular  577 k
 +
php-mysqlnd          x86_64  8.2.9-2.fc36.remi            remi-modular  216 k
 +
php-odbc              x86_64  8.2.9-2.fc36.remi            remi-modular  65 k
 +
php-opcache          x86_64  8.2.9-2.fc36.remi            remi-modular  610 k
 +
php-pdo              x86_64  8.2.9-2.fc36.remi            remi-modular  118 k
 +
php-pecl-geoip        x86_64  1.1.1-16.fc36.remi.8.2      remi-modular  28 k
 +
php-pecl-gnupg        x86_64  1.5.1-1.fc36.remi.8.2        remi-modular  36 k
 +
php-pecl-imagick-im7  x86_64  3.7.0-7.fc36.remi.8.2        remi-modular  203 k
 +
php-pecl-json-post    x86_64  1.1.0-1.fc36.remi.8.2        remi-modular  22 k
 +
php-pecl-krb5        x86_64  1.1.5-1.fc36.remi.8.2        remi-modular  64 k
 +
php-pecl-mcrypt      x86_64  1.0.6-1.fc36.remi.8.2        remi-modular  35 k
 +
php-pecl-oauth        x86_64  2.0.7-6.fc36.remi.8.2        remi-modular  100 k
 +
php-pecl-rrd          x86_64  2.0.3-2.fc36.remi.8.2        remi-modular  29 k
 +
php-process          x86_64  8.2.9-2.fc36.remi            remi-modular  65 k
 +
php-pspell            x86_64  8.2.9-2.fc36.remi            remi-modular  27 k
 +
php-snmp              x86_64  8.2.9-2.fc36.remi            remi-modular  47 k
 +
php-soap              x86_64  8.2.9-2.fc36.remi            remi-modular  202 k
 +
php-sodium            x86_64  8.2.9-2.fc36.remi            remi-modular  62 k
 +
php-xml              x86_64  8.2.9-2.fc36.remi            remi-modular  215 k
 +
php-xz                x86_64  1.1.2-2.fc36.remi.8.2        remi-modular  21 k
 +
Installing dependencies:
 +
qdbm                  x86_64  1.8.78-50.fc36              fedora        279 k
 +
 
 +
Transaction Summary
 +
================================================================================
 +
Install  2 Packages
 +
Upgrade  32 Packages
 +
 
 +
Total download size: 12 M
 +
Is this ok [y/N]: y
 +
Downloading Packages:
 +
(1/34): php-bcmath-8.2.9-2.fc36.remi.x86_64.rpm  28 kB/s |  47 kB    00:01   
 +
(2/34): php-pecl-xmlrpc-1.0.0~rc3-2.fc36.remi.8  35 kB/s |  65 kB    00:01   
 +
(3/34): php-common-8.2.9-2.fc36.remi.x86_64.rpm 584 kB/s | 842 kB    00:01   
 +
(4/34): php-dba-8.2.9-2.fc36.remi.x86_64.rpm    228 kB/s |  51 kB    00:00   
 +
(5/34): qdbm-1.8.78-50.fc36.x86_64.rpm          51 kB/s | 279 kB    00:05   
 +
(6/34): php-fpm-8.2.9-2.fc36.remi.x86_64.rpm    759 kB/s | 1.9 MB    00:02   
 +
(7/34): php-gd-8.2.9-2.fc36.remi.x86_64.rpm      89 kB/s |  62 kB    00:00   
 +
(8/34): php-gmp-8.2.9-2.fc36.remi.x86_64.rpm    220 kB/s |  49 kB    00:00   
 +
(9/34): php-geos-1.0.0-24.fc36.remi.8.2.x86_64. 111 kB/s |  60 kB    00:00   
 +
(10/34): php-imap-8.2.9-2.fc36.remi.x86_64.rpm  283 kB/s |  69 kB    00:00   
 +
(11/34): php-intl-8.2.9-2.fc36.remi.x86_64.rpm  445 kB/s | 233 kB    00:00   
 +
(12/34): php-ldap-8.2.9-2.fc36.remi.x86_64.rpm  105 kB/s |  64 kB    00:00   
 +
(13/34): php-lz4-0.4.3-1.fc36.remi.8.2.x86_64.r  85 kB/s |  18 kB    00:00   
 +
(14/34): php-mysqlnd-8.2.9-2.fc36.remi.x86_64.r 343 kB/s | 216 kB    00:00   
 +
(15/34): php-mbstring-8.2.9-2.fc36.remi.x86_64. 530 kB/s | 577 kB    00:01   
 +
(16/34): php-odbc-8.2.9-2.fc36.remi.x86_64.rpm  136 kB/s |  65 kB    00:00   
 +
(17/34): php-cli-8.2.9-2.fc36.remi.x86_64.rpm  773 kB/s | 5.4 MB    00:07   
 +
(18/34): php-pdo-8.2.9-2.fc36.remi.x86_64.rpm  293 kB/s | 118 kB    00:00   
 +
(19/34): php-pecl-geoip-1.1.1-16.fc36.remi.8.2. 113 kB/s |  28 kB    00:00   
 +
(20/34): php-pecl-gnupg-1.5.1-1.fc36.remi.8.2.x  76 kB/s |  36 kB    00:00   
 +
(21/34): php-pecl-imagick-im7-3.7.0-7.fc36.remi 518 kB/s | 203 kB    00:00   
 +
(22/34): php-pecl-json-post-1.1.0-1.fc36.remi.8 101 kB/s |  22 kB    00:00   
 +
(23/34): php-opcache-8.2.9-2.fc36.remi.x86_64.r 490 kB/s | 610 kB    00:01   
 +
(24/34): php-pecl-krb5-1.1.5-1.fc36.remi.8.2.x8 140 kB/s |  64 kB    00:00   
 +
(25/34): php-pecl-mcrypt-1.0.6-1.fc36.remi.8.2.  76 kB/s |  35 kB    00:00   
 +
(26/34): php-pecl-rrd-2.0.3-2.fc36.remi.8.2.x86 127 kB/s |  29 kB    00:00   
 +
(27/34): php-pecl-oauth-2.0.7-6.fc36.remi.8.2.x 169 kB/s | 100 kB    00:00   
 +
(28/34): php-pspell-8.2.9-2.fc36.remi.x86_64.rp 120 kB/s |  27 kB    00:00   
 +
(29/34): php-snmp-8.2.9-2.fc36.remi.x86_64.rpm  209 kB/s |  47 kB    00:00   
 +
(30/34): php-process-8.2.9-2.fc36.remi.x86_64.r 145 kB/s |  65 kB    00:00   
 +
(31/34): php-sodium-8.2.9-2.fc36.remi.x86_64.rp 271 kB/s |  62 kB    00:00   
 +
(32/34): php-soap-8.2.9-2.fc36.remi.x86_64.rpm  524 kB/s | 202 kB    00:00   
 +
(33/34): php-xz-1.1.2-2.fc36.remi.8.2.x86_64.rp  91 kB/s |  21 kB    00:00   
 +
(34/34): php-xml-8.2.9-2.fc36.remi.x86_64.rpm  401 kB/s | 215 kB    00:00   
 +
--------------------------------------------------------------------------------
 +
Total                                          1.0 MB/s |  12 MB    00:11   
 +
Running transaction check
 +
Transaction check succeeded.
 +
Running transaction test
 +
Transaction test succeeded.
 +
Running transaction
 +
  Preparing        :                                                        1/1
 +
  Running scriptlet: php-common-8.2.9-2.fc36.remi.x86_64                    1/1
 +
  Running scriptlet: php-common-8.2.9-2.fc36.remi.x86_64                  1/68
 +
  Upgrading        : php-common-8.2.9-2.fc36.remi.x86_64                  1/68
 +
  Upgrading        : php-pdo-8.2.9-2.fc36.remi.x86_64                      2/68
 +
  Upgrading        : php-xml-8.2.9-2.fc36.remi.x86_64                      3/68
 +
  Installing      : qdbm-1.8.78-50.fc36.x86_64                            4/68
 +
  Upgrading        : php-dba-8.2.9-2.fc36.remi.x86_64                      5/68
 +
  Installing      : php-pecl-xmlrpc-1.0.0~rc3-2.fc36.remi.8.2.x86_64      6/68
 +
  Upgrading        : php-mysqlnd-8.2.9-2.fc36.remi.x86_64                  7/68
 +
  Upgrading        : php-odbc-8.2.9-2.fc36.remi.x86_64                    8/68
 +
  Upgrading        : php-bcmath-8.2.9-2.fc36.remi.x86_64                  9/68
 +
  Upgrading        : php-cli-8.2.9-2.fc36.remi.x86_64                    10/68
 +
  Upgrading        : php-fpm-8.2.9-2.fc36.remi.x86_64                    11/68
 +
  Running scriptlet: php-fpm-8.2.9-2.fc36.remi.x86_64                    11/68
 +
  Upgrading        : php-gd-8.2.9-2.fc36.remi.x86_64                      12/68
 +
  Upgrading        : php-geos-1.0.0-24.fc36.remi.8.2.x86_64              13/68
 +
  Upgrading        : php-gmp-8.2.9-2.fc36.remi.x86_64                    14/68
 +
  Upgrading        : php-imap-8.2.9-2.fc36.remi.x86_64                    15/68
 +
  Upgrading        : php-intl-8.2.9-2.fc36.remi.x86_64                    16/68
 +
  Upgrading        : php-ldap-8.2.9-2.fc36.remi.x86_64                    17/68
 +
  Upgrading        : php-lz4-0.4.3-1.fc36.remi.8.2.x86_64                18/68
 +
  Upgrading        : php-mbstring-8.2.9-2.fc36.remi.x86_64                19/68
 +
  Upgrading        : php-opcache-8.2.9-2.fc36.remi.x86_64                20/68
 +
  Upgrading        : php-pecl-geoip-1.1.1-16.fc36.remi.8.2.x86_64        21/68
 +
  Upgrading        : php-pecl-gnupg-1.5.1-1.fc36.remi.8.2.x86_64          22/68
 +
  Upgrading        : php-pecl-imagick-im7-3.7.0-7.fc36.remi.8.2.x86_64    23/68
 +
  Upgrading        : php-pecl-json-post-1.1.0-1.fc36.remi.8.2.x86_64      24/68
 +
  Upgrading        : php-pecl-krb5-1.1.5-1.fc36.remi.8.2.x86_64          25/68
 +
  Upgrading        : php-pecl-mcrypt-1.0.6-1.fc36.remi.8.2.x86_64        26/68
 +
  Upgrading        : php-pecl-oauth-2.0.7-6.fc36.remi.8.2.x86_64          27/68
 +
  Upgrading        : php-pecl-rrd-2.0.3-2.fc36.remi.8.2.x86_64            28/68
 +
  Upgrading        : php-process-8.2.9-2.fc36.remi.x86_64                29/68
 +
  Upgrading        : php-pspell-8.2.9-2.fc36.remi.x86_64                  30/68
 +
  Upgrading        : php-snmp-8.2.9-2.fc36.remi.x86_64                    31/68
 +
  Upgrading        : php-soap-8.2.9-2.fc36.remi.x86_64                    32/68
 +
  Upgrading        : php-sodium-8.2.9-2.fc36.remi.x86_64                  33/68
 +
  Upgrading        : php-xz-1.1.2-2.fc36.remi.8.2.x86_64                  34/68
 +
  Cleanup          : php-pecl-json-post-1.1.0-1.fc36.remi.7.4.x86_64      35/68
 +
  Cleanup          : php-xz-1.1.2-2.fc36.remi.7.4.x86_64                  36/68
 +
  Cleanup          : php-pecl-rrd-2.0.3-2.fc36.remi.7.4.x86_64            37/68
 +
  Cleanup          : php-pecl-oauth-2.0.7-5.fc36.remi.7.4.x86_64          38/68
 +
  Cleanup          : php-pecl-mcrypt-1.0.6-1.fc36.remi.7.4.x86_64        39/68
 +
  Cleanup          : php-pecl-krb5-1.1.5-1.fc36.remi.7.4.x86_64          40/68
 +
  Cleanup          : php-pecl-imagick-im7-3.7.0-7.fc36.remi.7.4.x86_64    41/68
 +
  Cleanup          : php-pecl-gnupg-1.5.1-1.fc36.remi.7.4.x86_64          42/68
 +
  Cleanup          : php-pecl-geoip-1.1.1-16.fc36.remi.7.4.x86_64        43/68
 +
  Cleanup          : php-lz4-0.4.3-1.fc36.remi.7.4.x86_64                44/68
 +
  Cleanup          : php-geos-1.0.0-23.fc36.remi.7.4.x86_64              45/68
 +
  Cleanup          : php-sodium-7.4.33-8.fc36.remi.x86_64                46/68
 +
  Cleanup          : php-soap-7.4.33-8.fc36.remi.x86_64                  47/68
 +
  Cleanup          : php-snmp-7.4.33-8.fc36.remi.x86_64                  48/68
 +
  Cleanup          : php-pspell-7.4.33-8.fc36.remi.x86_64                49/68
 +
  Cleanup          : php-process-7.4.33-8.fc36.remi.x86_64                50/68
 +
  Cleanup          : php-opcache-7.4.33-8.fc36.remi.x86_64                51/68
 +
  Cleanup          : php-odbc-7.4.33-8.fc36.remi.x86_64                  52/68
 +
  Cleanup          : php-mysqlnd-7.4.33-8.fc36.remi.x86_64                53/68
 +
  Cleanup          : php-pdo-7.4.33-8.fc36.remi.x86_64                    54/68
 +
  Cleanup          : php-mbstring-7.4.33-8.fc36.remi.x86_64              55/68
 +
  Cleanup          : php-ldap-7.4.33-8.fc36.remi.x86_64                  56/68
 +
  Cleanup          : php-intl-7.4.33-8.fc36.remi.x86_64                  57/68
 +
  Cleanup          : php-imap-7.4.33-8.fc36.remi.x86_64                  58/68
 +
  Cleanup          : php-gmp-7.4.33-8.fc36.remi.x86_64                    59/68
 +
  Cleanup          : php-gd-7.4.33-8.fc36.remi.x86_64                    60/68
 +
  Running scriptlet: php-fpm-7.4.33-8.fc36.remi.x86_64                    61/68
 +
  Cleanup          : php-fpm-7.4.33-8.fc36.remi.x86_64                    61/68
 +
  Cleanup          : php-dba-7.4.33-8.fc36.remi.x86_64                    62/68
 +
  Cleanup          : php-cli-7.4.33-8.fc36.remi.x86_64                    63/68
 +
  Cleanup          : php-bcmath-7.4.33-8.fc36.remi.x86_64                64/68
 +
  Obsoleting      : php-xmlrpc-7.4.33-8.fc36.remi.x86_64                65/68
 +
  Cleanup          : php-xml-7.4.33-8.fc36.remi.x86_64                    66/68
 +
  Cleanup          : php-common-7.4.33-8.fc36.remi.x86_64                67/68
 +
  Obsoleting      : php-json-7.4.33-8.fc36.remi.x86_64                  68/68
 +
  Running scriptlet: php-json-7.4.33-8.fc36.remi.x86_64                  68/68
 +
  Verifying        : qdbm-1.8.78-50.fc36.x86_64                            1/68
 +
  Verifying        : php-pecl-xmlrpc-1.0.0~rc3-2.fc36.remi.8.2.x86_64      2/68
 +
  Verifying        : php-xmlrpc-7.4.33-8.fc36.remi.x86_64                  3/68
 +
  Verifying        : php-bcmath-8.2.9-2.fc36.remi.x86_64                  4/68
 +
  Verifying        : php-bcmath-7.4.33-8.fc36.remi.x86_64                  5/68
 +
  Verifying        : php-cli-8.2.9-2.fc36.remi.x86_64                      6/68
 +
  Verifying        : php-cli-7.4.33-8.fc36.remi.x86_64                    7/68
 +
  Verifying        : php-common-8.2.9-2.fc36.remi.x86_64                  8/68
 +
  Verifying        : php-common-7.4.33-8.fc36.remi.x86_64                  9/68
 +
  Verifying        : php-json-7.4.33-8.fc36.remi.x86_64                  10/68
 +
  Verifying        : php-dba-8.2.9-2.fc36.remi.x86_64                    11/68
 +
  Verifying        : php-dba-7.4.33-8.fc36.remi.x86_64                    12/68
 +
  Verifying        : php-fpm-8.2.9-2.fc36.remi.x86_64                    13/68
 +
  Verifying        : php-fpm-7.4.33-8.fc36.remi.x86_64                    14/68
 +
  Verifying        : php-gd-8.2.9-2.fc36.remi.x86_64                      15/68
 +
  Verifying        : php-gd-7.4.33-8.fc36.remi.x86_64                    16/68
 +
  Verifying        : php-geos-1.0.0-24.fc36.remi.8.2.x86_64              17/68
 +
  Verifying        : php-geos-1.0.0-23.fc36.remi.7.4.x86_64              18/68
 +
  Verifying        : php-gmp-8.2.9-2.fc36.remi.x86_64                    19/68
 +
  Verifying        : php-gmp-7.4.33-8.fc36.remi.x86_64                    20/68
 +
  Verifying        : php-imap-8.2.9-2.fc36.remi.x86_64                    21/68
 +
  Verifying        : php-imap-7.4.33-8.fc36.remi.x86_64                  22/68
 +
  Verifying        : php-intl-8.2.9-2.fc36.remi.x86_64                    23/68
 +
  Verifying        : php-intl-7.4.33-8.fc36.remi.x86_64                  24/68
 +
  Verifying        : php-ldap-8.2.9-2.fc36.remi.x86_64                    25/68
 +
  Verifying        : php-ldap-7.4.33-8.fc36.remi.x86_64                  26/68
 +
  Verifying        : php-lz4-0.4.3-1.fc36.remi.8.2.x86_64                27/68
 +
  Verifying        : php-lz4-0.4.3-1.fc36.remi.7.4.x86_64                28/68
 +
  Verifying        : php-mbstring-8.2.9-2.fc36.remi.x86_64                29/68
 +
  Verifying        : php-mbstring-7.4.33-8.fc36.remi.x86_64              30/68
 +
  Verifying        : php-mysqlnd-8.2.9-2.fc36.remi.x86_64                31/68
 +
  Verifying        : php-mysqlnd-7.4.33-8.fc36.remi.x86_64                32/68
 +
  Verifying        : php-odbc-8.2.9-2.fc36.remi.x86_64                    33/68
 +
  Verifying        : php-odbc-7.4.33-8.fc36.remi.x86_64                  34/68
 +
  Verifying        : php-opcache-8.2.9-2.fc36.remi.x86_64                35/68
 +
  Verifying        : php-opcache-7.4.33-8.fc36.remi.x86_64                36/68
 +
  Verifying        : php-pdo-8.2.9-2.fc36.remi.x86_64                    37/68
 +
  Verifying        : php-pdo-7.4.33-8.fc36.remi.x86_64                    38/68
 +
  Verifying        : php-pecl-geoip-1.1.1-16.fc36.remi.8.2.x86_64        39/68
 +
  Verifying        : php-pecl-geoip-1.1.1-16.fc36.remi.7.4.x86_64        40/68
 +
  Verifying        : php-pecl-gnupg-1.5.1-1.fc36.remi.8.2.x86_64          41/68
 +
  Verifying        : php-pecl-gnupg-1.5.1-1.fc36.remi.7.4.x86_64          42/68
 +
  Verifying        : php-pecl-imagick-im7-3.7.0-7.fc36.remi.8.2.x86_64    43/68
 +
  Verifying        : php-pecl-imagick-im7-3.7.0-7.fc36.remi.7.4.x86_64    44/68
 +
  Verifying        : php-pecl-json-post-1.1.0-1.fc36.remi.8.2.x86_64      45/68
 +
  Verifying        : php-pecl-json-post-1.1.0-1.fc36.remi.7.4.x86_64      46/68
 +
  Verifying        : php-pecl-krb5-1.1.5-1.fc36.remi.8.2.x86_64          47/68
 +
  Verifying        : php-pecl-krb5-1.1.5-1.fc36.remi.7.4.x86_64          48/68
 +
  Verifying        : php-pecl-mcrypt-1.0.6-1.fc36.remi.8.2.x86_64        49/68
 +
  Verifying        : php-pecl-mcrypt-1.0.6-1.fc36.remi.7.4.x86_64        50/68
 +
  Verifying        : php-pecl-oauth-2.0.7-6.fc36.remi.8.2.x86_64          51/68
 +
  Verifying        : php-pecl-oauth-2.0.7-5.fc36.remi.7.4.x86_64          52/68
 +
  Verifying        : php-pecl-rrd-2.0.3-2.fc36.remi.8.2.x86_64            53/68
 +
  Verifying        : php-pecl-rrd-2.0.3-2.fc36.remi.7.4.x86_64            54/68
 +
  Verifying        : php-process-8.2.9-2.fc36.remi.x86_64                55/68
 +
  Verifying        : php-process-7.4.33-8.fc36.remi.x86_64                56/68
 +
  Verifying        : php-pspell-8.2.9-2.fc36.remi.x86_64                  57/68
 +
  Verifying        : php-pspell-7.4.33-8.fc36.remi.x86_64                58/68
 +
  Verifying        : php-snmp-8.2.9-2.fc36.remi.x86_64                    59/68
 +
  Verifying        : php-snmp-7.4.33-8.fc36.remi.x86_64                  60/68
 +
  Verifying        : php-soap-8.2.9-2.fc36.remi.x86_64                    61/68
 +
  Verifying        : php-soap-7.4.33-8.fc36.remi.x86_64                  62/68
 +
  Verifying        : php-sodium-8.2.9-2.fc36.remi.x86_64                  63/68
 +
  Verifying        : php-sodium-7.4.33-8.fc36.remi.x86_64                64/68
 +
  Verifying        : php-xml-8.2.9-2.fc36.remi.x86_64                    65/68
 +
  Verifying        : php-xml-7.4.33-8.fc36.remi.x86_64                    66/68
 +
  Verifying        : php-xz-1.1.2-2.fc36.remi.8.2.x86_64                  67/68
 +
  Verifying        : php-xz-1.1.2-2.fc36.remi.7.4.x86_64                  68/68
 +
 
 +
Upgraded:
 +
  php-bcmath-8.2.9-2.fc36.remi.x86_64                                         
 +
  php-cli-8.2.9-2.fc36.remi.x86_64                                             
 +
  php-common-8.2.9-2.fc36.remi.x86_64                                         
 +
  php-dba-8.2.9-2.fc36.remi.x86_64                                             
 +
  php-fpm-8.2.9-2.fc36.remi.x86_64                                             
 +
  php-gd-8.2.9-2.fc36.remi.x86_64                                             
 +
  php-geos-1.0.0-24.fc36.remi.8.2.x86_64                                       
 +
  php-gmp-8.2.9-2.fc36.remi.x86_64                                             
 +
  php-imap-8.2.9-2.fc36.remi.x86_64                                           
 +
  php-intl-8.2.9-2.fc36.remi.x86_64                                           
 +
  php-ldap-8.2.9-2.fc36.remi.x86_64                                           
 +
  php-lz4-0.4.3-1.fc36.remi.8.2.x86_64                                         
 +
  php-mbstring-8.2.9-2.fc36.remi.x86_64                                       
 +
  php-mysqlnd-8.2.9-2.fc36.remi.x86_64                                         
 +
  php-odbc-8.2.9-2.fc36.remi.x86_64                                           
 +
  php-opcache-8.2.9-2.fc36.remi.x86_64                                         
 +
  php-pdo-8.2.9-2.fc36.remi.x86_64                                             
 +
  php-pecl-geoip-1.1.1-16.fc36.remi.8.2.x86_64                                 
 +
  php-pecl-gnupg-1.5.1-1.fc36.remi.8.2.x86_64                                 
 +
  php-pecl-imagick-im7-3.7.0-7.fc36.remi.8.2.x86_64                           
 +
  php-pecl-json-post-1.1.0-1.fc36.remi.8.2.x86_64                             
 +
  php-pecl-krb5-1.1.5-1.fc36.remi.8.2.x86_64                                   
 +
  php-pecl-mcrypt-1.0.6-1.fc36.remi.8.2.x86_64                                 
 +
  php-pecl-oauth-2.0.7-6.fc36.remi.8.2.x86_64                                 
 +
  php-pecl-rrd-2.0.3-2.fc36.remi.8.2.x86_64                                   
 +
  php-process-8.2.9-2.fc36.remi.x86_64                                         
 +
  php-pspell-8.2.9-2.fc36.remi.x86_64                                         
 +
  php-snmp-8.2.9-2.fc36.remi.x86_64                                           
 +
  php-soap-8.2.9-2.fc36.remi.x86_64                                           
 +
  php-sodium-8.2.9-2.fc36.remi.x86_64                                         
 +
  php-xml-8.2.9-2.fc36.remi.x86_64                                             
 +
  php-xz-1.1.2-2.fc36.remi.8.2.x86_64                                         
 +
Installed:
 +
  php-pecl-xmlrpc-1.0.0~rc3-2.fc36.remi.8.2.x86_64  qdbm-1.8.78-50.fc36.x86_64
 +
 
 +
Complete!
 +
</pre>
 +
 
 +
<br /><br />
 +
 
 +
== '''Create PHPInfo.php File - First Test & Diagnostics of PHP Installation''' ==
 +
After installing all of the PHP packages, tools and files, it's a good idea to test the installtion to make sure it's installed and configured correctly, as well as show all of the installation's options available.
 +
 
 +
<br /><br />
 +
A file commonly named "phpinfo.php" is created as described in the following steps, which does just this!
 +
<br /><br />
 +
Using the text editor of your choice(I prefer vi/vim, but newbies like pico), create a new file named phpinfo.php, or anything you want, as long as it ends with the .php filename extension, in the root directory of your web server.  On Linux, that us usually /var/www/html.  Within that file, enter these three lines of text:
 
<pre style="color:blue">
 
<pre style="color:blue">
 
<?php
 
<?php
phpinfo()
+
phpinfo();
 
?>
 
?>
 
</pre>
 
</pre>
 
<br /><br />
 
<br /><br />
Here's the scrollback of me doing it on one of my VM's:
+
Here's the scrollback of me doing it on one of my VM's (Kind of a mini-tutorial on VI~!):
 
<pre style="color:blue">
 
<pre style="color:blue">
 
[jamie@cos8vm8.dawgland.com:~]$ cd /var/www/html/
 
[jamie@cos8vm8.dawgland.com:~]$ cd /var/www/html/
Line 13: Line 357:
 
<br /><br />
 
<br /><br />
 
I then hit the "ENTER" key, taking me into a blank page, as seen here:
 
I then hit the "ENTER" key, taking me into a blank page, as seen here:
 +
<pre style="color:blue">
  
 
~                                                                               
 
~                                                                               
Line 38: Line 383:
 
"phpinfo.php" [New File]
 
"phpinfo.php" [New File]
 
</pre>
 
</pre>
At this point, I'm in "command" mode, so I need to tap the "I" key to put me into "Insert" mode.  Then, I can type in the 3 required lines:
+
At this point, I'm in Vi's "command" mode, so I need to tap the "I" key to put me into "Insert" mode.  Then, I can type in the 3 required lines:
 
<pre style="color:blue">
 
<pre style="color:blue">
 
<?php
 
<?php
Line 45: Line 390:
 
</pre>
 
</pre>
 
<br /><br />
 
<br /><br />
I then need to get out of "Insert" mode within vi/vim, so I tap the "Escape" key to do that, taking me back to "command" mode(there is no prompt or notification you have changed modes - you just need to know what you are doing, which is why most newbies don't care much for VI/VIM!). Once back in "command" mode, most VI guys use the colon and then the "w" key to "write" the file, and the "q" key to quit VI, such as ":wq", without the quotes in my example.  The beauty and power of VI is modern versions allow you to use ":x" without the quotes, to exit and save in one command, the "x" command!  Here is the screenshot of me doing so:
+
I then need to get out of "Insert" mode within VI/VIM(VIM=Vi Improved), so I tap the "Escape" key to do that, taking me back to "command" mode(there is no prompt or notification you have changed modes - you just need to know what you are doing, which is why most newbies don't care much for VI/VIM!). Once back in "command" mode, most VI guys use the colon and then the "w" key to "write" the file, and the "q" key to quit VI, such as ":wq", without the quotes in my example.  The beauty and power of VI is modern versions allow you to use ":x" without the quotes, to exit and save in one command, the "x" command!  Here is the screenshot of me doing so:
 
<pre style="color:blue">
 
<pre style="color:blue">
 
<?php
 
<?php
Line 75: Line 420:
 
Once saved, and as long as you've already installed and configured PHP to work with your web server, you can then check it out at http://your-website-address/phpinfo.php and you should see a page similar to this:
 
Once saved, and as long as you've already installed and configured PHP to work with your web server, you can then check it out at http://your-website-address/phpinfo.php and you should see a page similar to this:
 
<br />
 
<br />
 +
[[File:PHPINFO Screenshot.jpg|center|thumb|899x899px]]
  
  
  
 
[jamie@cos8vm8.dawgland.com:/var/www/html]$
 
[jamie@cos8vm8.dawgland.com:/var/www/html]$

Latest revision as of 03:52, 2 November 2023

PHP - Website scripting language used to create dynamic websites

Custom PHP Distributions - 3rd Party

There are a number of custom PHP distributions out there, usually created for specific use-cases. Others are great when you need a newer version of PHP that what is naitively available for your current version of your Linux distribution.

For instance, the new website app you want to use on your website requires PHP 8.2, but your version of Linux only has PHP 7.4 available through it's normal package repository. There are third-party custom PHP distributions created by these developers that allow you to install the newer version of PHP and it's supported accessories and tools.

Upgrading Third-Party Custom PHP Distribution Repository Configurations

As new software packages and tools become available, so do thier PHP requirements. What once needed PHP 7.4 to run properly now needs PHP version 8.2 to run the new version of the package required. In order to do this properly and keep the system "clean", configured "correctly", you should follow the "standard process" for the particulare package you are dealing with, as all are different, depending on what you are wanting to do in the end.

PHP Upgrade - Real-World Urgent Upgrade Required!

I currently encounreded a real-world urgent upgrade requirement for the currently installed version of PHP on my Fedora 36 workstation laptop with this exact same scenario. I had installed the YUM/DNF PHP repository configuration files for the 3rd-party "Remi php 7.4" packages long ago, when it was the newest available version, and Fedora 36 didn't support any PHP higher than 5.x at the time. Long since then, I have begun to get warning messages on that laptop aobut the outdated and extremely "vulnerable" PHP version 7.4 installed, and that I should upgrade immediatelly.

I had to figure out how to upgrade the Remi repository configuration files to support the latest version of PHP currently available through Remi, and went through this process:

[root@fc36.dawgland.com:~]# dnf module reset php
Fedora 36 - x86_64 - Updates                    8.5 kB/s | 4.5 kB     00:00    
Fedora Modular 36 - x86_64 - Updates            7.4 kB/s | 2.3 kB     00:00    
Dependencies resolved.
================================================================================
 Package           Architecture     Version             Repository         Size
================================================================================
Resetting modules:
 php                                                                           

Transaction Summary
================================================================================

Is this ok [y/N]: y
Complete!



Next, you need to enable the desired release you want/need to use. In my case, I want to use/enable the latest/greatest, PHP version 8.2, so ran this command next:

[root@fc36.dawgland.com:~]# dnf module enable php:remi-8.2
Last metadata expiration check: 0:06:35 ago on Wed 01 Nov 2023 08:32:58 PM PDT.
Dependencies resolved.
================================================================================
 Package           Architecture     Version             Repository         Size
================================================================================
Enabling module streams:
 php                                remi-8.2                                   

Transaction Summary
================================================================================

Is this ok [y/N]: y
Complete!



Then, to implement and install/upgrade all of the PHP packages to release/version 8.2, run this command, again, as the "root", aka, superuser:

[root@fc36.dawgland.com:~]# dnf update php\*
Last metadata expiration check: 0:06:55 ago on Tue 31 Oct 2023 11:30:11 AM PDT.
Dependencies resolved.
================================================================================
 Package               Arch    Version                      Repository     Size
================================================================================
Installing:
 php-pecl-xmlrpc       x86_64  1.0.0~rc3-2.fc36.remi.8.2    remi-modular   65 k
     replacing  php-xmlrpc.x86_64 7.4.33-8.fc36.remi
Upgrading:
 php-bcmath            x86_64  8.2.9-2.fc36.remi            remi-modular   47 k
 php-cli               x86_64  8.2.9-2.fc36.remi            remi-modular  5.4 M
 php-common            x86_64  8.2.9-2.fc36.remi            remi-modular  842 k
     replacing  php-json.x86_64 7.4.33-8.fc36.remi
 php-dba               x86_64  8.2.9-2.fc36.remi            remi-modular   51 k
 php-fpm               x86_64  8.2.9-2.fc36.remi            remi-modular  1.9 M
 php-gd                x86_64  8.2.9-2.fc36.remi            remi-modular   62 k
 php-geos              x86_64  1.0.0-24.fc36.remi.8.2       remi-modular   60 k
 php-gmp               x86_64  8.2.9-2.fc36.remi            remi-modular   49 k
 php-imap              x86_64  8.2.9-2.fc36.remi            remi-modular   69 k
 php-intl              x86_64  8.2.9-2.fc36.remi            remi-modular  233 k
 php-ldap              x86_64  8.2.9-2.fc36.remi            remi-modular   64 k
 php-lz4               x86_64  0.4.3-1.fc36.remi.8.2        remi-modular   18 k
 php-mbstring          x86_64  8.2.9-2.fc36.remi            remi-modular  577 k
 php-mysqlnd           x86_64  8.2.9-2.fc36.remi            remi-modular  216 k
 php-odbc              x86_64  8.2.9-2.fc36.remi            remi-modular   65 k
 php-opcache           x86_64  8.2.9-2.fc36.remi            remi-modular  610 k
 php-pdo               x86_64  8.2.9-2.fc36.remi            remi-modular  118 k
 php-pecl-geoip        x86_64  1.1.1-16.fc36.remi.8.2       remi-modular   28 k
 php-pecl-gnupg        x86_64  1.5.1-1.fc36.remi.8.2        remi-modular   36 k
 php-pecl-imagick-im7  x86_64  3.7.0-7.fc36.remi.8.2        remi-modular  203 k
 php-pecl-json-post    x86_64  1.1.0-1.fc36.remi.8.2        remi-modular   22 k
 php-pecl-krb5         x86_64  1.1.5-1.fc36.remi.8.2        remi-modular   64 k
 php-pecl-mcrypt       x86_64  1.0.6-1.fc36.remi.8.2        remi-modular   35 k
 php-pecl-oauth        x86_64  2.0.7-6.fc36.remi.8.2        remi-modular  100 k
 php-pecl-rrd          x86_64  2.0.3-2.fc36.remi.8.2        remi-modular   29 k
 php-process           x86_64  8.2.9-2.fc36.remi            remi-modular   65 k
 php-pspell            x86_64  8.2.9-2.fc36.remi            remi-modular   27 k
 php-snmp              x86_64  8.2.9-2.fc36.remi            remi-modular   47 k
 php-soap              x86_64  8.2.9-2.fc36.remi            remi-modular  202 k
 php-sodium            x86_64  8.2.9-2.fc36.remi            remi-modular   62 k
 php-xml               x86_64  8.2.9-2.fc36.remi            remi-modular  215 k
 php-xz                x86_64  1.1.2-2.fc36.remi.8.2        remi-modular   21 k
Installing dependencies:
 qdbm                  x86_64  1.8.78-50.fc36               fedora        279 k

Transaction Summary
================================================================================
Install   2 Packages
Upgrade  32 Packages

Total download size: 12 M
Is this ok [y/N]: y
Downloading Packages:
(1/34): php-bcmath-8.2.9-2.fc36.remi.x86_64.rpm  28 kB/s |  47 kB     00:01    
(2/34): php-pecl-xmlrpc-1.0.0~rc3-2.fc36.remi.8  35 kB/s |  65 kB     00:01    
(3/34): php-common-8.2.9-2.fc36.remi.x86_64.rpm 584 kB/s | 842 kB     00:01    
(4/34): php-dba-8.2.9-2.fc36.remi.x86_64.rpm    228 kB/s |  51 kB     00:00    
(5/34): qdbm-1.8.78-50.fc36.x86_64.rpm           51 kB/s | 279 kB     00:05    
(6/34): php-fpm-8.2.9-2.fc36.remi.x86_64.rpm    759 kB/s | 1.9 MB     00:02    
(7/34): php-gd-8.2.9-2.fc36.remi.x86_64.rpm      89 kB/s |  62 kB     00:00    
(8/34): php-gmp-8.2.9-2.fc36.remi.x86_64.rpm    220 kB/s |  49 kB     00:00    
(9/34): php-geos-1.0.0-24.fc36.remi.8.2.x86_64. 111 kB/s |  60 kB     00:00    
(10/34): php-imap-8.2.9-2.fc36.remi.x86_64.rpm  283 kB/s |  69 kB     00:00    
(11/34): php-intl-8.2.9-2.fc36.remi.x86_64.rpm  445 kB/s | 233 kB     00:00    
(12/34): php-ldap-8.2.9-2.fc36.remi.x86_64.rpm  105 kB/s |  64 kB     00:00    
(13/34): php-lz4-0.4.3-1.fc36.remi.8.2.x86_64.r  85 kB/s |  18 kB     00:00    
(14/34): php-mysqlnd-8.2.9-2.fc36.remi.x86_64.r 343 kB/s | 216 kB     00:00    
(15/34): php-mbstring-8.2.9-2.fc36.remi.x86_64. 530 kB/s | 577 kB     00:01    
(16/34): php-odbc-8.2.9-2.fc36.remi.x86_64.rpm  136 kB/s |  65 kB     00:00    
(17/34): php-cli-8.2.9-2.fc36.remi.x86_64.rpm   773 kB/s | 5.4 MB     00:07    
(18/34): php-pdo-8.2.9-2.fc36.remi.x86_64.rpm   293 kB/s | 118 kB     00:00    
(19/34): php-pecl-geoip-1.1.1-16.fc36.remi.8.2. 113 kB/s |  28 kB     00:00    
(20/34): php-pecl-gnupg-1.5.1-1.fc36.remi.8.2.x  76 kB/s |  36 kB     00:00    
(21/34): php-pecl-imagick-im7-3.7.0-7.fc36.remi 518 kB/s | 203 kB     00:00    
(22/34): php-pecl-json-post-1.1.0-1.fc36.remi.8 101 kB/s |  22 kB     00:00    
(23/34): php-opcache-8.2.9-2.fc36.remi.x86_64.r 490 kB/s | 610 kB     00:01    
(24/34): php-pecl-krb5-1.1.5-1.fc36.remi.8.2.x8 140 kB/s |  64 kB     00:00    
(25/34): php-pecl-mcrypt-1.0.6-1.fc36.remi.8.2.  76 kB/s |  35 kB     00:00    
(26/34): php-pecl-rrd-2.0.3-2.fc36.remi.8.2.x86 127 kB/s |  29 kB     00:00    
(27/34): php-pecl-oauth-2.0.7-6.fc36.remi.8.2.x 169 kB/s | 100 kB     00:00    
(28/34): php-pspell-8.2.9-2.fc36.remi.x86_64.rp 120 kB/s |  27 kB     00:00    
(29/34): php-snmp-8.2.9-2.fc36.remi.x86_64.rpm  209 kB/s |  47 kB     00:00    
(30/34): php-process-8.2.9-2.fc36.remi.x86_64.r 145 kB/s |  65 kB     00:00    
(31/34): php-sodium-8.2.9-2.fc36.remi.x86_64.rp 271 kB/s |  62 kB     00:00    
(32/34): php-soap-8.2.9-2.fc36.remi.x86_64.rpm  524 kB/s | 202 kB     00:00    
(33/34): php-xz-1.1.2-2.fc36.remi.8.2.x86_64.rp  91 kB/s |  21 kB     00:00    
(34/34): php-xml-8.2.9-2.fc36.remi.x86_64.rpm   401 kB/s | 215 kB     00:00    
--------------------------------------------------------------------------------
Total                                           1.0 MB/s |  12 MB     00:11     
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                        1/1 
  Running scriptlet: php-common-8.2.9-2.fc36.remi.x86_64                    1/1 
  Running scriptlet: php-common-8.2.9-2.fc36.remi.x86_64                   1/68 
  Upgrading        : php-common-8.2.9-2.fc36.remi.x86_64                   1/68 
  Upgrading        : php-pdo-8.2.9-2.fc36.remi.x86_64                      2/68 
  Upgrading        : php-xml-8.2.9-2.fc36.remi.x86_64                      3/68 
  Installing       : qdbm-1.8.78-50.fc36.x86_64                            4/68 
  Upgrading        : php-dba-8.2.9-2.fc36.remi.x86_64                      5/68 
  Installing       : php-pecl-xmlrpc-1.0.0~rc3-2.fc36.remi.8.2.x86_64      6/68 
  Upgrading        : php-mysqlnd-8.2.9-2.fc36.remi.x86_64                  7/68 
  Upgrading        : php-odbc-8.2.9-2.fc36.remi.x86_64                     8/68 
  Upgrading        : php-bcmath-8.2.9-2.fc36.remi.x86_64                   9/68 
  Upgrading        : php-cli-8.2.9-2.fc36.remi.x86_64                     10/68 
  Upgrading        : php-fpm-8.2.9-2.fc36.remi.x86_64                     11/68 
  Running scriptlet: php-fpm-8.2.9-2.fc36.remi.x86_64                     11/68 
  Upgrading        : php-gd-8.2.9-2.fc36.remi.x86_64                      12/68 
  Upgrading        : php-geos-1.0.0-24.fc36.remi.8.2.x86_64               13/68 
  Upgrading        : php-gmp-8.2.9-2.fc36.remi.x86_64                     14/68 
  Upgrading        : php-imap-8.2.9-2.fc36.remi.x86_64                    15/68 
  Upgrading        : php-intl-8.2.9-2.fc36.remi.x86_64                    16/68 
  Upgrading        : php-ldap-8.2.9-2.fc36.remi.x86_64                    17/68 
  Upgrading        : php-lz4-0.4.3-1.fc36.remi.8.2.x86_64                 18/68 
  Upgrading        : php-mbstring-8.2.9-2.fc36.remi.x86_64                19/68 
  Upgrading        : php-opcache-8.2.9-2.fc36.remi.x86_64                 20/68 
  Upgrading        : php-pecl-geoip-1.1.1-16.fc36.remi.8.2.x86_64         21/68 
  Upgrading        : php-pecl-gnupg-1.5.1-1.fc36.remi.8.2.x86_64          22/68 
  Upgrading        : php-pecl-imagick-im7-3.7.0-7.fc36.remi.8.2.x86_64    23/68 
  Upgrading        : php-pecl-json-post-1.1.0-1.fc36.remi.8.2.x86_64      24/68 
  Upgrading        : php-pecl-krb5-1.1.5-1.fc36.remi.8.2.x86_64           25/68 
  Upgrading        : php-pecl-mcrypt-1.0.6-1.fc36.remi.8.2.x86_64         26/68 
  Upgrading        : php-pecl-oauth-2.0.7-6.fc36.remi.8.2.x86_64          27/68 
  Upgrading        : php-pecl-rrd-2.0.3-2.fc36.remi.8.2.x86_64            28/68 
  Upgrading        : php-process-8.2.9-2.fc36.remi.x86_64                 29/68 
  Upgrading        : php-pspell-8.2.9-2.fc36.remi.x86_64                  30/68 
  Upgrading        : php-snmp-8.2.9-2.fc36.remi.x86_64                    31/68 
  Upgrading        : php-soap-8.2.9-2.fc36.remi.x86_64                    32/68 
  Upgrading        : php-sodium-8.2.9-2.fc36.remi.x86_64                  33/68 
  Upgrading        : php-xz-1.1.2-2.fc36.remi.8.2.x86_64                  34/68 
  Cleanup          : php-pecl-json-post-1.1.0-1.fc36.remi.7.4.x86_64      35/68 
  Cleanup          : php-xz-1.1.2-2.fc36.remi.7.4.x86_64                  36/68 
  Cleanup          : php-pecl-rrd-2.0.3-2.fc36.remi.7.4.x86_64            37/68 
  Cleanup          : php-pecl-oauth-2.0.7-5.fc36.remi.7.4.x86_64          38/68 
  Cleanup          : php-pecl-mcrypt-1.0.6-1.fc36.remi.7.4.x86_64         39/68 
  Cleanup          : php-pecl-krb5-1.1.5-1.fc36.remi.7.4.x86_64           40/68 
  Cleanup          : php-pecl-imagick-im7-3.7.0-7.fc36.remi.7.4.x86_64    41/68 
  Cleanup          : php-pecl-gnupg-1.5.1-1.fc36.remi.7.4.x86_64          42/68 
  Cleanup          : php-pecl-geoip-1.1.1-16.fc36.remi.7.4.x86_64         43/68 
  Cleanup          : php-lz4-0.4.3-1.fc36.remi.7.4.x86_64                 44/68 
  Cleanup          : php-geos-1.0.0-23.fc36.remi.7.4.x86_64               45/68 
  Cleanup          : php-sodium-7.4.33-8.fc36.remi.x86_64                 46/68 
  Cleanup          : php-soap-7.4.33-8.fc36.remi.x86_64                   47/68 
  Cleanup          : php-snmp-7.4.33-8.fc36.remi.x86_64                   48/68 
  Cleanup          : php-pspell-7.4.33-8.fc36.remi.x86_64                 49/68 
  Cleanup          : php-process-7.4.33-8.fc36.remi.x86_64                50/68 
  Cleanup          : php-opcache-7.4.33-8.fc36.remi.x86_64                51/68 
  Cleanup          : php-odbc-7.4.33-8.fc36.remi.x86_64                   52/68 
  Cleanup          : php-mysqlnd-7.4.33-8.fc36.remi.x86_64                53/68 
  Cleanup          : php-pdo-7.4.33-8.fc36.remi.x86_64                    54/68 
  Cleanup          : php-mbstring-7.4.33-8.fc36.remi.x86_64               55/68 
  Cleanup          : php-ldap-7.4.33-8.fc36.remi.x86_64                   56/68 
  Cleanup          : php-intl-7.4.33-8.fc36.remi.x86_64                   57/68 
  Cleanup          : php-imap-7.4.33-8.fc36.remi.x86_64                   58/68 
  Cleanup          : php-gmp-7.4.33-8.fc36.remi.x86_64                    59/68 
  Cleanup          : php-gd-7.4.33-8.fc36.remi.x86_64                     60/68 
  Running scriptlet: php-fpm-7.4.33-8.fc36.remi.x86_64                    61/68 
  Cleanup          : php-fpm-7.4.33-8.fc36.remi.x86_64                    61/68 
  Cleanup          : php-dba-7.4.33-8.fc36.remi.x86_64                    62/68 
  Cleanup          : php-cli-7.4.33-8.fc36.remi.x86_64                    63/68 
  Cleanup          : php-bcmath-7.4.33-8.fc36.remi.x86_64                 64/68 
  Obsoleting       : php-xmlrpc-7.4.33-8.fc36.remi.x86_64                 65/68 
  Cleanup          : php-xml-7.4.33-8.fc36.remi.x86_64                    66/68 
  Cleanup          : php-common-7.4.33-8.fc36.remi.x86_64                 67/68 
  Obsoleting       : php-json-7.4.33-8.fc36.remi.x86_64                   68/68 
  Running scriptlet: php-json-7.4.33-8.fc36.remi.x86_64                   68/68 
  Verifying        : qdbm-1.8.78-50.fc36.x86_64                            1/68 
  Verifying        : php-pecl-xmlrpc-1.0.0~rc3-2.fc36.remi.8.2.x86_64      2/68 
  Verifying        : php-xmlrpc-7.4.33-8.fc36.remi.x86_64                  3/68 
  Verifying        : php-bcmath-8.2.9-2.fc36.remi.x86_64                   4/68 
  Verifying        : php-bcmath-7.4.33-8.fc36.remi.x86_64                  5/68 
  Verifying        : php-cli-8.2.9-2.fc36.remi.x86_64                      6/68 
  Verifying        : php-cli-7.4.33-8.fc36.remi.x86_64                     7/68 
  Verifying        : php-common-8.2.9-2.fc36.remi.x86_64                   8/68 
  Verifying        : php-common-7.4.33-8.fc36.remi.x86_64                  9/68 
  Verifying        : php-json-7.4.33-8.fc36.remi.x86_64                   10/68 
  Verifying        : php-dba-8.2.9-2.fc36.remi.x86_64                     11/68 
  Verifying        : php-dba-7.4.33-8.fc36.remi.x86_64                    12/68 
  Verifying        : php-fpm-8.2.9-2.fc36.remi.x86_64                     13/68 
  Verifying        : php-fpm-7.4.33-8.fc36.remi.x86_64                    14/68 
  Verifying        : php-gd-8.2.9-2.fc36.remi.x86_64                      15/68 
  Verifying        : php-gd-7.4.33-8.fc36.remi.x86_64                     16/68 
  Verifying        : php-geos-1.0.0-24.fc36.remi.8.2.x86_64               17/68 
  Verifying        : php-geos-1.0.0-23.fc36.remi.7.4.x86_64               18/68 
  Verifying        : php-gmp-8.2.9-2.fc36.remi.x86_64                     19/68 
  Verifying        : php-gmp-7.4.33-8.fc36.remi.x86_64                    20/68 
  Verifying        : php-imap-8.2.9-2.fc36.remi.x86_64                    21/68 
  Verifying        : php-imap-7.4.33-8.fc36.remi.x86_64                   22/68 
  Verifying        : php-intl-8.2.9-2.fc36.remi.x86_64                    23/68 
  Verifying        : php-intl-7.4.33-8.fc36.remi.x86_64                   24/68 
  Verifying        : php-ldap-8.2.9-2.fc36.remi.x86_64                    25/68 
  Verifying        : php-ldap-7.4.33-8.fc36.remi.x86_64                   26/68 
  Verifying        : php-lz4-0.4.3-1.fc36.remi.8.2.x86_64                 27/68 
  Verifying        : php-lz4-0.4.3-1.fc36.remi.7.4.x86_64                 28/68 
  Verifying        : php-mbstring-8.2.9-2.fc36.remi.x86_64                29/68 
  Verifying        : php-mbstring-7.4.33-8.fc36.remi.x86_64               30/68 
  Verifying        : php-mysqlnd-8.2.9-2.fc36.remi.x86_64                 31/68 
  Verifying        : php-mysqlnd-7.4.33-8.fc36.remi.x86_64                32/68 
  Verifying        : php-odbc-8.2.9-2.fc36.remi.x86_64                    33/68 
  Verifying        : php-odbc-7.4.33-8.fc36.remi.x86_64                   34/68 
  Verifying        : php-opcache-8.2.9-2.fc36.remi.x86_64                 35/68 
  Verifying        : php-opcache-7.4.33-8.fc36.remi.x86_64                36/68 
  Verifying        : php-pdo-8.2.9-2.fc36.remi.x86_64                     37/68 
  Verifying        : php-pdo-7.4.33-8.fc36.remi.x86_64                    38/68 
  Verifying        : php-pecl-geoip-1.1.1-16.fc36.remi.8.2.x86_64         39/68 
  Verifying        : php-pecl-geoip-1.1.1-16.fc36.remi.7.4.x86_64         40/68 
  Verifying        : php-pecl-gnupg-1.5.1-1.fc36.remi.8.2.x86_64          41/68 
  Verifying        : php-pecl-gnupg-1.5.1-1.fc36.remi.7.4.x86_64          42/68 
  Verifying        : php-pecl-imagick-im7-3.7.0-7.fc36.remi.8.2.x86_64    43/68 
  Verifying        : php-pecl-imagick-im7-3.7.0-7.fc36.remi.7.4.x86_64    44/68 
  Verifying        : php-pecl-json-post-1.1.0-1.fc36.remi.8.2.x86_64      45/68 
  Verifying        : php-pecl-json-post-1.1.0-1.fc36.remi.7.4.x86_64      46/68 
  Verifying        : php-pecl-krb5-1.1.5-1.fc36.remi.8.2.x86_64           47/68 
  Verifying        : php-pecl-krb5-1.1.5-1.fc36.remi.7.4.x86_64           48/68 
  Verifying        : php-pecl-mcrypt-1.0.6-1.fc36.remi.8.2.x86_64         49/68 
  Verifying        : php-pecl-mcrypt-1.0.6-1.fc36.remi.7.4.x86_64         50/68 
  Verifying        : php-pecl-oauth-2.0.7-6.fc36.remi.8.2.x86_64          51/68 
  Verifying        : php-pecl-oauth-2.0.7-5.fc36.remi.7.4.x86_64          52/68 
  Verifying        : php-pecl-rrd-2.0.3-2.fc36.remi.8.2.x86_64            53/68 
  Verifying        : php-pecl-rrd-2.0.3-2.fc36.remi.7.4.x86_64            54/68 
  Verifying        : php-process-8.2.9-2.fc36.remi.x86_64                 55/68 
  Verifying        : php-process-7.4.33-8.fc36.remi.x86_64                56/68 
  Verifying        : php-pspell-8.2.9-2.fc36.remi.x86_64                  57/68 
  Verifying        : php-pspell-7.4.33-8.fc36.remi.x86_64                 58/68 
  Verifying        : php-snmp-8.2.9-2.fc36.remi.x86_64                    59/68 
  Verifying        : php-snmp-7.4.33-8.fc36.remi.x86_64                   60/68 
  Verifying        : php-soap-8.2.9-2.fc36.remi.x86_64                    61/68 
  Verifying        : php-soap-7.4.33-8.fc36.remi.x86_64                   62/68 
  Verifying        : php-sodium-8.2.9-2.fc36.remi.x86_64                  63/68 
  Verifying        : php-sodium-7.4.33-8.fc36.remi.x86_64                 64/68 
  Verifying        : php-xml-8.2.9-2.fc36.remi.x86_64                     65/68 
  Verifying        : php-xml-7.4.33-8.fc36.remi.x86_64                    66/68 
  Verifying        : php-xz-1.1.2-2.fc36.remi.8.2.x86_64                  67/68 
  Verifying        : php-xz-1.1.2-2.fc36.remi.7.4.x86_64                  68/68 

Upgraded:
  php-bcmath-8.2.9-2.fc36.remi.x86_64                                           
  php-cli-8.2.9-2.fc36.remi.x86_64                                              
  php-common-8.2.9-2.fc36.remi.x86_64                                           
  php-dba-8.2.9-2.fc36.remi.x86_64                                              
  php-fpm-8.2.9-2.fc36.remi.x86_64                                              
  php-gd-8.2.9-2.fc36.remi.x86_64                                               
  php-geos-1.0.0-24.fc36.remi.8.2.x86_64                                        
  php-gmp-8.2.9-2.fc36.remi.x86_64                                              
  php-imap-8.2.9-2.fc36.remi.x86_64                                             
  php-intl-8.2.9-2.fc36.remi.x86_64                                             
  php-ldap-8.2.9-2.fc36.remi.x86_64                                             
  php-lz4-0.4.3-1.fc36.remi.8.2.x86_64                                          
  php-mbstring-8.2.9-2.fc36.remi.x86_64                                         
  php-mysqlnd-8.2.9-2.fc36.remi.x86_64                                          
  php-odbc-8.2.9-2.fc36.remi.x86_64                                             
  php-opcache-8.2.9-2.fc36.remi.x86_64                                          
  php-pdo-8.2.9-2.fc36.remi.x86_64                                              
  php-pecl-geoip-1.1.1-16.fc36.remi.8.2.x86_64                                  
  php-pecl-gnupg-1.5.1-1.fc36.remi.8.2.x86_64                                   
  php-pecl-imagick-im7-3.7.0-7.fc36.remi.8.2.x86_64                             
  php-pecl-json-post-1.1.0-1.fc36.remi.8.2.x86_64                               
  php-pecl-krb5-1.1.5-1.fc36.remi.8.2.x86_64                                    
  php-pecl-mcrypt-1.0.6-1.fc36.remi.8.2.x86_64                                  
  php-pecl-oauth-2.0.7-6.fc36.remi.8.2.x86_64                                   
  php-pecl-rrd-2.0.3-2.fc36.remi.8.2.x86_64                                     
  php-process-8.2.9-2.fc36.remi.x86_64                                          
  php-pspell-8.2.9-2.fc36.remi.x86_64                                           
  php-snmp-8.2.9-2.fc36.remi.x86_64                                             
  php-soap-8.2.9-2.fc36.remi.x86_64                                             
  php-sodium-8.2.9-2.fc36.remi.x86_64                                           
  php-xml-8.2.9-2.fc36.remi.x86_64                                              
  php-xz-1.1.2-2.fc36.remi.8.2.x86_64                                           
Installed:
  php-pecl-xmlrpc-1.0.0~rc3-2.fc36.remi.8.2.x86_64  qdbm-1.8.78-50.fc36.x86_64 

Complete!



Create PHPInfo.php File - First Test & Diagnostics of PHP Installation

After installing all of the PHP packages, tools and files, it's a good idea to test the installtion to make sure it's installed and configured correctly, as well as show all of the installation's options available.



A file commonly named "phpinfo.php" is created as described in the following steps, which does just this!

Using the text editor of your choice(I prefer vi/vim, but newbies like pico), create a new file named phpinfo.php, or anything you want, as long as it ends with the .php filename extension, in the root directory of your web server. On Linux, that us usually /var/www/html. Within that file, enter these three lines of text:

<?php
phpinfo();
?>



Here's the scrollback of me doing it on one of my VM's (Kind of a mini-tutorial on VI~!):

[jamie@cos8vm8.dawgland.com:~]$ cd /var/www/html/
[jamie@cos8vm8.dawgland.com:/var/www/html]$ sudo vi phpinfo.php



I then hit the "ENTER" key, taking me into a blank page, as seen here:


~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
"phpinfo.php" [New File]

At this point, I'm in Vi's "command" mode, so I need to tap the "I" key to put me into "Insert" mode. Then, I can type in the 3 required lines:

<?php
phpinfo()
?>



I then need to get out of "Insert" mode within VI/VIM(VIM=Vi Improved), so I tap the "Escape" key to do that, taking me back to "command" mode(there is no prompt or notification you have changed modes - you just need to know what you are doing, which is why most newbies don't care much for VI/VIM!). Once back in "command" mode, most VI guys use the colon and then the "w" key to "write" the file, and the "q" key to quit VI, such as ":wq", without the quotes in my example. The beauty and power of VI is modern versions allow you to use ":x" without the quotes, to exit and save in one command, the "x" command! Here is the screenshot of me doing so:

<?php
phpinfo()
?>

~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
~                                                                               
:x



Once saved, and as long as you've already installed and configured PHP to work with your web server, you can then check it out at http://your-website-address/phpinfo.php and you should see a page similar to this:

Error creating thumbnail: File missing


[jamie@cos8vm8.dawgland.com:/var/www/html]$