How to Install PHP Intl Extension in Ubuntu 22.04 ?

11-Jan-2024

.

Admin

How to Install PHP Intl Extension in Ubuntu 22.04 ?

Hello Dev,

This article will give you an example of how to install php intl extension in Ubuntu 22.04. We will use setting up PHP intl extension on Ubuntu 22.04. This article goes into detail on a guide to installing php intl extension in Ubuntu 22.04. you will learn step-by-step: php intl extension installation on Ubuntu 22.04. So, let's follow a few steps to create an example of installing php intl extension for ubuntu 22.04: a comprehensive tutorial.

Install PHP Intl Extension in Ubuntu 22.04


Install Intl Extension For PHP 8.3

To install the Intl extension for PHP 8.3, execute the following commands.

sudo apt-get install php8.3-intl

Install Intl Extension For PHP 8.2

To install the Intl extension for PHP 8.2, execute the following commands.

sudo apt-get install php8.2-intl

Install Intl Extension For PHP 8.1

To install the Intl extension for PHP 8.1, execute the following commands.

sudo apt-get install php8.1-intl

Install Intl Extension For PHP 8.0

To install the Intl extension for PHP 8.0, execute the following commands.

sudo apt-get install php8.0-intl

Install Intl Extension For PHP 7.4

To install the Intl extension for PHP 7.4, execute the following commands.

sudo apt-get install php7.4-intl

Install Intl Extension For PHP 7.3

To install the Intl extension for PHP 7.3, execute the following commands.

sudo apt-get install php7.3-intl

Install Intl Extension For PHP 7.2

To install the Intl extension for PHP 7.2, execute the following commands.

sudo apt-get install php7.2-intl

Restart Apache Server.

To restart the Apache2 server, use the following command.

sudo service apache2 restart

Executing this command will restart the Apache2 server, applying any changes made during the installation of the PHP Intl extension on your Ubuntu system.

Check php-intl Extension Installed

To verify the successful installation of the PHP intl extension, use the following command.

php -m | grep intl

Executing this command will display a list of enabled PHP modules. If the PHP intl extension is installed correctly, you should see 'intl' in the output, confirming that the intl extension is now part of your PHP configuration.

Or

To verify if the Intl extension is enabled, create a PHP file with the following content.

<?php

phpinfo();

?>

Save this file with a .php extension, such as info.php, and position it in your web server's document root or any directory accessible through your web browser.

Access the file through your web browser by navigating to.

http://your_domain_or_IP/info.php

Look for the 'Intl' section in the PHP information page that opens. If the Intl extension is enabled, you will find details about it in that section.

It's important to note that the package name (php-intl) and web server commands may vary slightly depending on your specific PHP version and web server configuration. For the latest and most accurate information, especially if using Ubuntu 22.04, please refer to the official documentation or community resources. Stay informed about any potential changes or updates to ensure a smooth installation process and compatibility with your PHP and web server setup.

I hope it can help you...

#Ubuntu