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.
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).
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.
Find More on CodeIgniter 4 here
- CodeIgniter 4 Cookie Helper Tutorial
- CodeIgniter 4 CRUD Application Tutorial
- CodeIgniter 4 CRUD REST APIs Tutorial
- CodeIgniter 4 CSRF Token in AJAX Request
- Database Query in CodeIgniter 4 Tutorial
- CodeIgniter 4 Ajax Form Data Submit
- CodeIgniter 4 Form Validation Tutorial
- CodeIgniter 4 Image Upload with Form Tutorial
- Multi language in CodeIgniter 4 Tutorial
- Stripe Payment Gateway Integration in CodeIgniter 4
- CodeIgniter 4 CSRF Token Tutorial
- CodeIgniter 4 Basics Tutorial
- CodeIgniter 4 Spark CLI Commands Tutorial
- Migration in CodeIgniter 4 Tutorial
- Seeders in CodeIgniter 4 Tutorial