Hello Guys, How are you all? Hope You all Are Fine. Today I am trying to install CodeIgniter 4 via Composer but I am facing following error the requested PHP extension intl is missing from your system in PHP. So Here I am Explain to you all the possible solutions
here.
Without wasting your time, Let’s start This Article to Solve This Error. I am trying to install CodeIgniter 4 via Composer but I am facing following error. Problem 1 To Solve the
requested PHP extension intl is missing from your system Error Your PHP config missing Intl Extension. All You need to do is Just uncomment Following line. In Your XAMPP. First of all You just need to open php.ini file. xampp_folder_path]/php/php.ini to edit.Search for ;extension=intl and remove the ;.Save the php.ini file and restart Apache.Now, Your error must be
solved. To Solve the requested PHP extension intl is missing from your system Error Your PHP config missing Intl Extension. All You need to do is Just uncomment Following line. In Your XAMPP. First of all You just need to open php.ini file. xampp_folder_path]/php/php.ini to edit.Search for ;extension=intl and remove
the ;.Save the php.ini file and restart Apache.Now, Your error must be solved.How This Error Occurs ?
– codeigniter4/framework v4.0.0-rc.3 requires ext-intl * -> the requested PHP extension intl is missing from your system.
–
Installation request for codeigniter4/framework ^4@rc -> satisfiable by codeigniter4/framework[4.0.0-rc.4, v4.0.0-rc.1, v4.0.0-rc.2, v4.0.0-rc.2.1, v4.0.0-rc.3]. To enable extensions, verify that they are enabled in your .ini files:
– D:\xampp\php\php.ini You can also run `php –ini` inside terminal to see which files are used by PHP in CLI mode.
Your PHP config missing Intl Extension. All You need to do is Just uncomment Following line. In Your XAMPP.
- First of all You just need to open php.ini file.
- xampp_folder_path]/php/php.ini to edit.
- Search for ;extension=intl and remove the ;.
- Save the php.ini file and restart Apache.
- Now, Your error must be solved.
Solution 2: For Ubuntu
Here You are missing the intl extension
for PHP So .If You are using Ubuntu system then just run this command in your terminal.
sudo apt-get install php-intl
and Then restart apache.
sudo service apache2 restart
Now, Your error should be fixed.
Summary
It’s all About this issue. Hope all solution helped you a lot. Comment below Your thoughts and your queries. Also, Comment below which solution worked for you?
Also, Read
- Target class controller does not exist in Laravel 8
Problem
PHP packages/frameworks/libraries/scripts we work with might require different PHP extensions. In this case the Intl extension is needed to work with using Internationalization Functions.
What is Internationalization?
Got any of these error messages?
- Zend InputFilter requires intl PHP extension
- The requested PHP extension intl is missing from your system
This happened because the PHP Intl extension isn’t installed or enabled.
Parts of this tutorial can be also a guide for installing or enabling other extensions.
What is PHP Intl?
Internationalization extension [further is referred as Intl] is a wrapper for » ICU library, enabling PHP programmers to perform various locale-aware operations including but not limited to formatting, transliteration, encoding conversion, calendar operations
Source: PHP Documentation
This extension may be installed using the bundled version as of PHP 5.3.0, or as a PECL extension as of PHP 5.2.0. In other words, there are two methods to install the intl extension.
Source: PHP Documentation
Cause
If you have installed the unbundled PHP version, the extension is not installed on the system. [unless you’ve installed it separately]
If you have the bundled PHP version, the extension might be existing but not enabled.
Solutions
For Linux-based Server [assuming you have root access]:
- Make sure the
php_intl.so file exists within your php extensions directory, find the extensions directory by:
- using phpinfo[]
- running this command:
php -r "echo ini_get['extension_dir'];"
- [note: both options gets the extension_dir right from the PHP runtime configuration]
- If the file exists:
- search for the config file [php.ini, usually /etc/php.ini] and open it
- Make sure the line “extension=php_intl.so” is existing and not commented
- Restart the web server [usually sudo service httpd restart]
- Check if the extension is enabled using phpinfo[]
- If the file doesn’t exist
- Check your php version by running the “php -v” command
- For PHP 5 install the php-intl package using your package manager – package managers and commands
- Most common: apt-get install php-intl [for ubuntu-based linux] or yum install php-intl [for CentOS]
- For PHP 7, install the php7.x-intl [depending on your php version]
- Repeat the steps for the case in which the file exists
For projects hosted on a shared hosting platform you must ask your hosting provider to install/enable the PHP Intl extension.
For Windows-based Server:
- Make sure the php_intl.dll file exists within your php extensions directory
- for separately installed PHP: C:\path\to\php\ext\
- for xampp: C:\path\to\xampp\php\ext
- [note: your drive letter might be different]
- If the file exists:
- search for the config file [php.ini, usually in the same folder as the php executable] and open it
- Make sure the line “extension=php_intl.dll” is existing and not commented
- Restart the web server [usually apache]
- Check if the extension is enabled using phpinfo[]
- If the file doesn’t exist:
- Check your php version by running the “php -v” command
- Download the PHP version that corresponds to yours from the PHP Downloads Page [TS/NTS,
x86/x64]
- To find thread safety for php, run: php -i | findstr “Thread” , source & more info.
- To find thread safety for php, run: php -i | findstr “Thread” , source & more info.
- Search for the php_intl.dll file in the ext folder in that version and copy it in your php\ext folder
- Repeat the steps for the case in which the file exists
Edit: changed php7.0 occurrences with php7.x as the version may vary.