Table of Contents
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.
Learn More –
- Bootstrap Growl jQuery Notification to CodeIgniter 4
- Call MySQL Stored Procedure in CodeIgniter 4 Tutorial
- Change Default Timezone in CodeIgniter 4 Tutorial
- CodeIgniter 4 Command – Change PHP Spark Default PORT
Let’s start – 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).
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.
Online Web Tutor invites you to try Skillshare free for 1 month! Learn CakePHP 4, Laravel APIs Development, CodeIgniter 4, Node Js, etc into a depth level. Master the Coding Skills to Become an Expert in Web Development. So, Search your favourite course and enroll now. Click here to join.