How to Install PHP 8.2 for Apache on CentOS Stream 9

To install PHP 8.2 for Apache on CentOS Stream 9, follow these steps.

Step 1 : Update

Step 2 : Import PHP Remi Repository

Step 3 : Check PHP Modules

Step 4 : Enable PHP Remi Repository

Step 5 : Install PHP Core (php8.2)

Step 6 : Install Common PHP Extensions

Explanation of Extensions:

- cli: Command Line Interface for PHP.

- mysqlnd: MySQL native driver for PHP.

- curl: PHP extension for client-side URL transfers.

- gd: Graphics Draw (used for image processing).

- mcrypt: Deprecated cryptography functions.

- json: JSON serialization and deserialization support.

- pear: PHP Extension and Application Repository framework.

- common: Common files for PHP.

- xml: XML parsing for PHP.

- zip: ZIP archive management for PHP.

- devel: Development files for PHP.

- xsl: XSL transformation support for PHP.

- soap: Simple Object Access Protocol support for PHP.

- bcmath: Binary Calculator functions for PHP.

- mbstring: Multibyte support for PHP.

- gettext: Internationalization functions for PHP.

- imagick: ImageMagick extension for PHP.

Step 7 : Verify PHP Version

Step 8 : Restart Apache

Step 9 : Test PHP

Step 10 : Visit the Test PHP Info

Open a web browser and navigate to your domain (e.g., http://your_domain/info.php) to test your PHP installation.

Congratulations! You have successfully installed PHP 8.2 for Apache on CentOS Stream 9.