CodeIgniter 4 problem installing with composer
Asked Answered
C

6

17

I'm having problems trying to install CodeIgniter 4 via Composer, on a local server (xampp)

The code that throws me is the following:

    PS C:\Users\PuercoRico> cd D:\xampp\htdocs
PS D:\xampp\htdocs> composer create-project codeigniter4/appstarter ci4 -s rc
Installing codeigniter4/appstarter (4.0.0-rc.4)
  - Installing codeigniter4/appstarter (4.0.0-rc.4): Loading from cache
Created project in ci4
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - codeigniter4/framework v4.0.0-rc.3 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - codeigniter4/framework v4.0.0-rc.2.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - codeigniter4/framework v4.0.0-rc.2 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - codeigniter4/framework v4.0.0-rc.1 requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - codeigniter4/framework 4.0.0-rc.4 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.

The version of php that I am using is 7.4.1

Any idea what the error may be or how I can fix it.

Chadwick answered 16/2, 2020 at 16:19 Comment(2)
The error message is telling you exactly what the problem is and how to fix it.Ormiston
requires ext-intl * -> the requested PHP extension intl is missing from your system - which kind of questions are still open? Have you even tried anything to fix this?Pucida
A
66

Your PHP is missing intl extension. It is useful for formatting currency, number and date/time as well as UCA-conformant collations, for message formatting and normalizing text..etc.

Check out Codeignitor 4 [Documentation][1]:

Follow the steps to install it in XAMPP -

  1. Open [xampp_folder_path]/php/php.ini to edit.
  2. Search for ;extension=intl and remove the ;.
  3. Save the php.ini file and restart Apache.
Assuming answered 16/2, 2020 at 16:37 Comment(2)
Guys also this answer here below: https://mcmap.net/q/455119/-codeigniter-4-problem-installing-with-composer as it helped meCipher
thanks man. i'm new to php and wonder how a ";" removal can make it work?Symphonize
W
9

Quick Fix

  1. Open XAMPP Control Panel.
  2. Apache -> Select Config & Choose PHP(php.ini)
  3. Search for ;extension=intl and remove the ;.
  4. Save Changes

Restart Apache

Winton answered 10/8, 2020 at 21:39 Comment(0)
S
8

For Ubuntu/Linux and nginx write the following command in your terminal

sudo apt-get install php-intl
 
Shocking answered 7/5, 2021 at 10:49 Comment(1)
Works with Apache as well. Just had to restart Apache.Quevedo
S
4

You are missing the intl extension for PHP So,

  • On ubuntu 20.04 and PHP 7.4 with Apache webserver try:
sudo apt-get install php7.4-intl
sudo service apache2 restart
  • On ubuntu 20.04 and PHP 8.0 with Apache webserver try:
sudo apt-get install php8.0-intl
sudo service apache2 restart
  • On ubuntu 20.04 and PHP 7.4 with Nginx webserver try:
sudo apt-get install php7.4-intl
sudo systemctl reload nginx
  • On ubuntu 20.04 and PHP 8.0 with Nginx webserver try:
sudo apt-get install php8.0-intl
sudo systemctl reload nginx
Slackjawed answered 8/11, 2021 at 15:7 Comment(1)
Unable to locate package php7.4-intlExcavation
D
3
  1. Oper Your XAMPP Control Panel
  2. Click on the Config button related to the Apache service
  3. then Click on PHP (php.ini)
  4. Open the php.ini file and Find (CTRL+F) extension=intl
  5. by default that line displays as ;extension=intl
  6. remove the ; from the line and save the file
  7. Restart the Apache server
Drisko answered 14/8, 2022 at 3:3 Comment(0)
M
0

For fedora distributions used

sudo dnf install php-intl
Myocarditis answered 1/12, 2022 at 10:47 Comment(1)
This does not provide an answer to the question. Once you have sufficient reputation you will be able to comment on any post; instead, provide answers that don't require clarification from the asker. - From ReviewImpasto

© 2022 - 2024 — McMap. All rights reserved.