To install PHP 8.2 on the Apache web server running on Fedora 39, follow the steps below:
Step 1 : Update your system's package list to ensure you have the latest information about available packages and their versions.
Step 2 : Install the Remi repository, which provides up-to-date versions of PHP.
Step 3 : Check the available PHP modules to ensure the Remi repository is recognized.
Step 4 : Enable the PHP Remi repository to access the desired PHP version.
Step 5 : Install the PHP core package for version 8.2.
Step 6 : Install commonly used PHP extensions for various functionalities.
- cli: Command-line interface for PHP.
- mysqlnd: MySQL native driver for PHP.
- curl: Client URL library for data transfer.
- gd: Graphics Draw (used for image manipulation).
- mcrypt: Cryptography functions (considered obsolete, use alternatives).
- json: JSON handling support.
- pear: PHP Extension and Application Repository.
- common: Common functions and classes.
- xml: XML support.
- zip: ZIP archive support.
- devel: Development files for building PHP extensions.
- xsl: XSLT support for PHP.
- soap: Simple Object Access Protocol support.
- bcmath: Arbitrary precision mathematics functions.
- mbstring: Multibyte string support.
- gettext: Gettext support for internationalization.
- imagick: PHP extension to create and modify images.
Step 7 : Check the installed PHP version to ensure it's the desired one.
Step 8 : Restart Apache Restart the Apache web server to apply the changes:
Step 9 : Create a simple PHP file (info.php
) in the web server's root directory to test PHP.
Step 10 : Open your web browser and navigate to http://your_domain_or_ip/info.php
to view the PHP info page.
Congratulations! You have successfully completed the installation of PHP 8.2 for Apache on Fedora 39.