CodeIgniter 4 problem installing with composer

CodeIgniter 4 problem installing with composer

  1. Blog
  2. 15 November 2026
  3. 4 min read

Stefan Bogdanescu

Founder & Senior Architect

CodeIgniter 4 Installation Blocked by Missing PHP Extension

Attempting to scaffold a new CodeIgniter 4 application using Composer on a local development environment often hits a wall immediately if your PHP setup is incomplete. The error message you encountered is explicit: codeigniter4/framework v4.0.0-rc.3 requires ext-intl *. This indicates that the Composer dependency resolver has identified a missing requirement before it even attempts to fetch the framework files.

In the context of CodeIgniter 4, the intl extension is non-negotiable. Unlike some optional libraries that can be skipped or replaced with polyfills, the internationalization and localization features are baked into the core logic of the framework. Without this extension, critical classes responsible for date/time manipulation, currency formatting, and locale-aware string handling cannot instantiate. When you run composer create-project codeigniter4/appstarter ci4 -s rc, Composer attempts to install the latest release candidate (RC) versions to get you up and running quickly. However, if your environment lacks the compiled binary for ext-intl, the installation halts with a dependency resolution failure.

The root cause here is not a problem with Composer's logic or the CodeIgniter package itself; it is strictly an environmental configuration issue on your local server. You are running PHP 7.4.1 on XAMPP, and while this version supports the extension, it has likely not been enabled yet. The error output correctly points you to D:\xampp\php\php.ini as the primary location for enabling extensions, but it also suggests checking CLI configuration files. This distinction is vital because local servers often run two different PHP interpreters: one for the web server (Apache/Nginx) and one for command-line tasks like Composer.

To resolve this, you must ensure the intl extension is loaded in the specific PHP context that runs your Composer commands. First, locate the active configuration file. If you are running commands directly from Windows Command Prompt or PowerShell on a system where XAMPP is installed, you might be hitting a different php.ini than the one inside the xampp\php directory, or you might be using the bundled PHP without extensions loaded by default.

Run the following command in your terminal to list all active configuration files:

php --ini

This output will show which .ini file is currently loaded and where additional .ini files are searched. If ext-intl is missing from this list, you have two primary paths to fix it depending on your workflow.

Option 1: Modifying the XAMPP Configuration

If you intend to use the PHP version bundled with XAMPP for both web and CLI tasks, you need to manually enable the extension. Open the php.ini file located at D:\xampp\php\php.ini. Search for a line that looks like this:

;extension=intl

If the line is commented out (preceded by a semicolon), remove the semicolon to uncomment it. If the line is missing entirely, add it below the other extension declarations. Save the file and restart your XAMPP services, specifically Apache and MySQL, to ensure the changes take effect for the web server context. However, remember that this only affects the web server; you may still need a separate step for CLI tools if they are picking up a different PHP binary.

Option 2: Installing via Windows Package Manager

On Windows, the most reliable method to install missing extensions without manually compiling or editing php.ini is using the PECL command-line interface. Ensure you have the necessary build tools installed (often included with XAMPP or available via Visual C++ Redistributables), then run:

pecl install intl

This command will compile the extension against your current PHP 7.4 installation. Once installation completes, add extension=intl to your active php.ini file (the one identified by php --ini) and restart your PHP processes.

Why Not Just Skip It?

You might consider downgrading the CodeIgniter version in your composer.json or using a stable release instead of the RC channel (-s rc) to avoid this issue. However, CodeIgniter 4 dropped support for older PHP versions (like 7.2) relatively early in its lifecycle and requires modern extensions like intl, mbstring, and openssl. Attempting to force an older version of the framework onto a fresh install will likely result in other missing dependency errors that are equally difficult to resolve later.

If you prefer not to manage local PHP configurations manually, consider installing PHP globally using a tool like phpenv or switching to a containerized environment with Docker. This approach isolates your dependencies and guarantees that all required extensions are present before Composer attempts to install the framework. Regardless of the path you choose, ensuring ext-intl is active is the mandatory first step to getting CodeIgniter 4 running on your local machine.

Our network