ext-intl PHP Extension Error CodeIgniter 4 Installation

Share this Article
Reading Time: 5 minutes
740 Views

This article gives you the idea when you get CodeIgniter 4 Install error about ext-intl PHP missing extension. While installing CodeIgniter 4 we need some php extension which should be enabled before going into it.

In some cases, we found that system already have ext-intl PHP extension installed and loaded but nevertheless we get error of missing extension. So here we will see how can we fix PHP extension ext-intl issue.

Here is a sample overview of error what actually get at the time of CodeIgniter 4 application installation via composer.

Let’s start about the topic – ext-intl PHP Extension Error CodeIgniter 4 Installation


System Check – ext-intl

First you should verify your system has ext-intl php extension installed or not. How can you verify ?

Go to your localhost directory. In my case it is /var/www/html folder.

Next, create a file with name info.php (you can create with any name).

<?php
  
  phpinfo();

Save the code into file and open into browser as –

URL – http://localhost/info.php

When we scroll into this page, then we should see a section of intl extension.

This section will be visible if and only if php extension intl will be installed. If you are not getting this, first you need to install that.

To install in php 7.0

$ sudo apt-get install php7.0-curl

To install in php 7.4

$ sudo apt-get install php7.4-curl

After Installation extension, make sure to restart apache server.

$ sudo service apache2 restart

After doing these steps, hopefully you will be able to see extension intl section over php info page.


Already ext-intl Installed, Missing Error Why ?

Here, comes the twist. System already has the extension enabled. Also we are getting intl section at php info page. But still while installing CodeIgniter 4 via composer getting error.

Again and again getting Missing Extension error. How to fix this ?

To solve this issue, open terminal and run this command according to your system’s PHP version.

For PHP 7.0

$ sudo update-alternatives --set php /usr/bin/php7.0

For PHP 7.4

$ sudo update-alternatives --set php /usr/bin/php7.4

After running this command, it will update the all updates and set PHP version to work properly. And also you will be able to use composer to download setup.

We hope this article helped you about – ext-intl PHP Extension Error CodeIgniter 4 Installation in a very detailed way.

If you liked this article, then please subscribe to our YouTube Channel for PHP & it’s framework, WordPress, Node Js video tutorials. You can also find us on Twitter and Facebook.

Find More on CodeIgniter 4 here

1 thought on “ext-intl PHP Extension Error CodeIgniter 4 Installation”

Leave a Comment