To install PHP 7.4 on Fedora 40, follow these steps:
Step 1 : Ensure your system is up to date by running:
Step 2 : Add the Remi's repository by executing:
Step 3 : Verify the available PHP modules with:
Step 4 : Enable the PHP Remi repository using:
Step 5 : Install PHP core packages:
Step 6 : Install frequently used PHP extensions like mysqlnd, curl, gd...:
- mysqlnd: Provides MySQL Native Driver for PHP.
- curl: Enables PHP to communicate with various types of servers.
- gd: Adds support for creating and manipulating images.
- mcrypt: Offers encryption algorithms.
- json: Allows handling JSON data.
- pear: PHP Extension and Application Repository.
- common: Commonly used PHP components.
- xml: Manipulates XML documents.
- zip: Provides functions for handling zip archives.
- devel: Development files necessary for building PHP extensions.
- xsl: Adds XSL transformation support.
- soap: Enables SOAP functionality.
- bcmath: Provides arbitrary precision mathematics.
- mbstring: Multibyte string support.
- gettext: Adds internationalization and localization capabilities.
- imagick: PHP extension to create, edit, and compose bitmap images.
Step 7 : Ensure PHP is installed correctly by checking the version:
Congratulations! You have successfully installed PHP 7.4 on Fedora 40.