Welcome Guest, Not a member yet? Register   Sign In
The framework needs the following extension(s) installed and loaded: intl.?

(This post was last modified: 01-30-2022, 08:13 AM by blaasvaer.)

I didn't touch a project for about six weeks ... and now, continuing work I'm met by this error:
"Message: The framework needs the following extension(s) installed and loaded: intl."
Now, What On Earth is it with CI? WHY this sudden error? I didn't touch ANYTHING on my machine regarding PHP, Spark, the project in question ... can someone tell me basic stuff like:
What version is it that is run when I do:
php spark serve
And where do I find the corresponding php.ini file (or whatever files I need to (re-)configure to have this sudden, out of the blue, completely autonomous error disappear?
If I run:
which php
I only get:
which isn't of much help. It doesn't tell me anything use full ... I run brew, now could it be that there's some other version somewhere else on my system I have to aware of?
Could you please elaborate the "Running your App" page in the docs to be able to better help one self in case 'something' breaks? That would be a help.

(This post was last modified: 01-30-2022, 10:13 AM by demyr.)

Is it on your localhost or online with a hosting provider?

(This post was last modified: 01-30-2022, 06:41 PM by blaasvaer.)

It's localhost. And I'm having a complete nightmare figuring out which instance of PHP is running om my machine in relation to PHP SPARK.
I have MAMP running all my WordPress projects, but this specific project runs php using spark (as – sort of – recommended by the docs). I installed PHP using brew, and has it running. But I run into a serious of problems that I'm completely frustrated having to spend time trying to fix ...
I replaced the system folder – out of pure frustration, and Voila! The error was gone ... that is, until the next error turned up (being database connection related): and so it' been for the entire day. Nothing seems to work anymore.
I'm very close to ditchin' CI entirely as it leaves me with no confidence it's a good choice if I have to spend this huge amount of time just getting the bugger running again.
WHAT can I do to just make 'things' work again (as they simply used to do)?
(Home)Brew is a piece of crap that just adds to the confusion ... totally impossible to 'connect' the PHP installed with it to the one CI uses ... and the problems just pile up.

Burning the midnight oil I'm at this error:

failed to open stream: No such file or directory in /Applications/MAMP/htdocs/platform-codeigniter/system/Commands/Server/rewrite.php on line 43

// Otherwise, we'll load the index file and let
// the framework handle the request from here.
require_once $fcpath . 'index.php';
// @codeCoverageIgnoreEnd

Now, I didn't fuck around with any of the system files ... why on earth is CI being such a dick about it?

How do I fix it?

(This post was last modified: 01-31-2022, 01:33 AM by dgvirtual.)

When you run "php spark serve" in command line, you run the same php that is in your system or user PATH variable (or a php executable in the same directory - which is not your case clearly). In the same place running "php -v" will tell you what version of php it is, php -i will spit out a lot of info, including, mayhaps, the extensions that are enabled.
Judging from the directory where your codeigniter is installed - "/Applications/MAMP/htdocs/" I guess that you run a Mac version of MAMP. So you should probably search for information on how to enable the intl extension on MAMP resources. For example (I just googled, I did not check the content): https://stackoverflow.com/questions/5469...nning-mamp
Most likely this error you experience has nothing to do with Codeigniter. You just do not have the intl extension enabled.

(01-30-2022, 08:11 AM)blaasvaer Wrote: I
If I run:
which php
I only get:
So, to give another angle to the one I presented above: you really might have a few php versions installed. This one you run is the one in the PATH - /usr/bin/php. Must be a separate php package you have installed. But, as I said, you seem to have another one installed, that comes with MAMP server bundle. The php in MAMP most probably is not in your path and is located somewhere under

To use that version of php you will either have to start the MAMP server and run your app on Apache with php as it's module (that is, NOT  using "php spark serve", which starts php's own development server), or you could link the php binary to the directory where you run "php spark serve" or use the full path, something like
/Applications/MAMP/bin/php/php8.1/bin/php spark serve
(you will have to find the full path to the binary by browsing the file system). I think it is highly unlikely that MAMP would not have the intl extension enabled in php.

Donatas G.

(This post was last modified: 01-31-2022, 02:00 AM by InsiteFX.)

Edit your php.ini file an add the intl extension.

What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

(This post was last modified: 01-31-2022, 02:01 AM by captain-sensible. Edit Reason: extra )


I can only talk from the perspective of using Linux , more specifically Arch, but issues between running from your system and from "embedded stuff" should have a common theme .

Now regarding php on lInux its seamlessly integrated into the system , so php functioning from in my case /srv/http will be the system php ; with config say for php.ini being at /etc/php/php.ini

Also when you run a command like :

[[email protected]:~]$ which php                                            (01-31 08:52)

your invoking commands from your system , so its going to show you stuff about the "system" and not likely xampp which it doesn't basically know about because its not actually installed.

Now xampp, mamp is a diffferent kettle of fish. If I "install" xampp onto linux files usually go into /opt .

xampp is not seamesly installed onto your system; instead it runs on an "embedded" basis.

Now if on Linux you could use say "locate" as in

locate php.ini

you might find xampp has its own file. Anyway thats just a birds eye view of why there is a dichotomy . if you look at the top section of this post you will see,
extension=intl has no ";" in front of it that means I enabled it.

Thats why i stopped using xampp from apache friends ; in the long run better to just use apache on your own system

See https://www.php.net/manual/en/intro.intl.php to read about intl

Well, according to my php.ini neither:

is enabled. But I no longer get the first error, now I cannot connect to the database:
"Unable to connect to the database. Main connection [MySQLi]: No such file or directory"
But enabling: extension=mysqli makes no difference.
This is what homebrew throws at me when running $ brew info php:
php: stable 8.1.2 (bottled), HEAD
General-purpose scripting language
Not installed
From: https://github.com/Homebrew/homebrew-cor...ula/php.rb
License: PHP-3.01
==> Dependencies
Build: httpd ✘, pkg-config ✘
Required: apr ✔, apr-util ✔, argon2 ✔, aspell ✔, autoconf ✔, curl ✔, freetds ✔, gd ✔, gettext ✔, gmp ✔, icu4c ✔, krb5 ✔, libpq ✔, libsodium ✔, libzip ✔, oniguruma ✔, openldap ✔, [email protected] ✔, pcre2 ✔, sqlite ✔, tidy-html5 ✔, unixodbc ✔
==> Options
Install HEAD version
==> Caveats
To enable PHP in Apache add the following to httpd.conf and restart Apache:
    LoadModule php_module /usr/local/opt/php/lib/httpd/modules/libphp.so

    <FilesMatch \.php$>
        SetHandler application/x-httpd-php

Finally, check DirectoryIndex includes index.php
    DirectoryIndex index.php index.html

The php.ini and php-fpm.ini file can be found in:

To restart php after an upgrade:
  brew services restart php
Or, if you don't want/need a background service you can just run:
  /usr/local/opt/php/sbin/php-fpm --nodaemonize
==> Analytics
install: 105,406 (30 days), 319,404 (90 days), 799,369 (365 days)
install-on-request: 84,769 (30 days), 254,690 (90 days), 722,210 (365 days)
build-error: 55 (30 days)
in /Applications/MAMP/htdocs $

Notice how is says 'Not installed'.

Now, HOW on earth can brew claim there's a PHP 8.1.2 on my system when there's clearly not – only MAMP has a version 8 which is specifically versiopn 8.0.8?
The ONLY version of PHP related to brew is [email protected]
Why is PHP such a complete mess to get up and running properly?

Brew should not know about the php in the MAMP package.... but anyway, unless you find someone using Mac in this forum, willing to explore those issues with you, I suggest you try a more general php developer forum to walk you through your issue. In my experience, php setup is a non-issue on Linux systems; once I did miss intl extension on one computer, but it was easily solved by installing that particular extension via apt-get

Donatas G.

You need to remove the ; semi-colon from those two lines to enable the extensions.
What did you Try? What did you Get? What did you Expect?

Joined CodeIgniter Community 2009.  ( Skype: insitfx )

The php.ini file can be found under the root folder of your PHP engine installation path (for example, C:/php-7.4.22) . You can use Notepad, Wordpad or Notepad++ to edit your pnp.ini file.

Make the following changes in your php.ini file to point to the right path of the required modules – curl and intl. The php_curl.dll and php_intl.dll files will be found under the ext folder of your PHP engine installation path (for example, C:/php-7.4.22). If you have different path of PHP installation then you have to update it.


Theme © iAndrew 2016 - Forum software by © MyBB