5

I am trying to install CakePHP 3-0-0 version and I have downloaded the source code from here. But it is showing the error of enable intl extension. As I have already changed ;extension=php_intl.dll to extension=php_intl.dll (remove the semicolon) in php.ini file and restart xampp 2-3 times, but still it is showing that same error.

Here is the error below:

Fatal error: You must enable the intl extension to use CakePHP. in D:\xampp\htdocs\cakephp-3-0-0\config\bootstrap.php on line 38

So, can anyone please tell me what is the issue here? And what should I do to resolved this issue?

Mash
  • 420
  • 3
  • 5
  • 16

5 Answers5

7

Once you have activated the php_intl.dll in the php.ini file you also need to copy the dll files that php_intl.dll uses from the PHP folder to the Apache/bin folder.

I am not a XAMPP user so I am not sure of the actual folder names

copy xampp/php/icu*.dll to xamp\apache\bin

Also remember that you have to edit the php.ini file that lives in the \xampp\apache\bin folder and not the one in the \xampp\php folder.

The one in the \xampp\php folder only gets used by PHP CLI (Command Line Interface)

RiggsFolly
  • 93,638
  • 21
  • 103
  • 149
  • I already have `php_intl.dll` file into its respective directory `xampp/php/ext`. But still its not working. – Mash May 27 '15 at 11:50
  • 1
    You are not reading all the answer. You need to copy the `icu*.dll` files **FROM** the php folder **TO** the `apache\bin` folder. There are about 8 of these files – RiggsFolly May 27 '15 at 12:03
  • Oops Sorry!! its my mistake that one file was missing to copy. Now its working fine. Thanks -:). – Mash May 27 '15 at 12:17
  • There is no `xampp/php` in my case, but I do see `xampp/xamppfiles/php` but again I cannot find `icu*.dll` nor php_intl.dll`. I am lost here. – Adarsh Khatri Jun 27 '15 at 11:51
  • I am a WAMPServer user so I not totally familiar with XAMPP structure. I just download a XAMPP and `icu*.dll` files are in the `xampp/php` folder and the intl.dll is in `xampp\php\ext`. If you installed in a non default place then you will have to extrapolate these onto your folder structure – RiggsFolly Jun 27 '15 at 12:50
3

In my case problem was to restart Apache process. Restart in XAMPP control panel by clicking Stop and Start is not enough. I had to run Task Manager and kill httpd.exe process. Then run XAMPP again. That solve problem.

kaligari
  • 124
  • 1
  • 4
2

Just in case if you are using OSX

Steps from http://www.phpzce.com/blog/view/15/installing-intl-package-on-your-mac-with-xampp

  1. Check which php path is set i.e.

    root$: which php

  2. If you are using xampp on your mac it should be

    /Applications/XAMPP/xamppfiles/bin/php

but if its

/usr/bin/php 

you need to change your OSx php

root$: PATH="/Applications/XAMPP/xamppfiles/bin:${PATH}" 
  1. Install icu4c

    root$: brew install icu4c

  2. Install Intl via PECL

    root$: sudo pecl update-channels root$: sudo pecl install intl

  3. You can check if Intl was installed successfully

    root$: php -m | grep intl #should return 'intl'

Done

Kunal Panchal
  • 1,049
  • 11
  • 19
0

For me (not using any xampp, just Apache 2.4 and php 5.5. installed on Windows 7):

After uncommenting the intl-extension in php.ini, it didn't come active cause I only RESTARTED Apache server!

This is best to observe from phpinfo() page (try to find intl).

So I think the problem was solved when I stop and start the Apache server. (Probably same problem as in kaligari answer)

While trying solutions I moved the php folder and changed the folder to Apache conf file BUT forgot to change the environmental variable path to php, so after while I found this and got it work.

Control Panel->System->Advanced->Environmental variables->Path->Check php folder is there Thanks to Gregory Karpinsky

SO CHECK THAT IF EXTENSION IS STILL NOT LOADING!

No need to copy any files from php->apache\bin. This is probably because I'm not using xampp BUT it is necessery to actually STOP and START over the Apache service to get it to reload the php extensions and have the path environmental variable correct.

Community
  • 1
  • 1
Repeat Spacer
  • 373
  • 3
  • 17
0

If you have configured basic settings, try to restart xampp...It worked for me.

Aamir
  • 2,173
  • 1
  • 29
  • 58