Program Club

CakePHP 3.0 설치 : 시스템에 intl 확장이 없습니다.

proclub 2020. 11. 26. 20:10
반응형

CakePHP 3.0 설치 : 시스템에 intl 확장이 없습니다.


CakePHP 문서를 사용하여 작성기를 사용하여 3.0-beta2를 설치하려고하는데이 오류가 발생했습니다.

cakephp/cakephp 3.0.x-dev requires ext-intl * -> the requested PHP extension intl is missing from your system

그러나 intl이 설치되어 있음을 알고 있습니다 (phpinfo에 표시됨). PHP 5.4.33 / Apache 2.4.10.1을 사용하고 있습니다.


나는 오늘도 같은 문제에 직면했다. PHP 구성 ( ) 에서 intl PHP 확장 을 활성화해야합니다 .ini.

Xampp 솔루션 (Windows)

  1. 열다 /xampp/php/php.ini
  2. 변경 ;extension=php_intl.dllextension=php_intl.dll(세미콜론을 제거)
  3. 모든 /xamp/php/ic*.dll파일을/xampp/apache/bin
  4. Xampp 제어판에서 아파치를 다시 시작하십시오.

솔루션 Linux (Annamalai Somasundaram 덕분에)

  1. php5-intl 확장 설치 sudo apt-get install php5-intl

    1.1. sudo yum install php5-intlCentOS 또는 Fedora를 사용하는 경우 또는 사용 하십시오.

  2. Apache 다시 시작 sudo service apache2 restart

솔루션 Mac / OSX (자작) (deizel 덕분에)

  1. php5-intl 확장 설치 brew install php56-intl
  2. 당신이 얻을 경우 No available formula for php56-intl에 따라 지침을.
  3. Apache 다시 시작 sudo apachectl restart

결국 composer install작동하는지 확인하기 위해 실행할 수 있습니다 . 그렇지 않은 경우 오류가 발생합니다.


우분투 12.04에서 같은 문제에 직면했습니다.

설치됨 : sudo apt-get install php5-intl

다시 시작 Apache: sudo service apache2 restart


OS X Homebrew (2015 년 5 월) :

intl확장은 메인에서 제거 된 php5x더 이상 컴파일하지 않도록, 공식 --enable-intl플래그.

새 패키지를 찾을 수없는 경우 :

$ brew install php56-intl
Error: No available formula for php56-intl

다음 지침을 따르십시오 : https://github.com/Homebrew/homebrew-php/issues/1701

$ brew install php56-intl
==> Installing php56-intl from homebrew/homebrew-php

MAMP를 사용하는 경우

1 터미널로 이동

vim ~/.bash_profile

i

export PATH=/Applications/MAMP/bin/php/php5.6.2/bin:$PATH

php5.6.2를 MAMP와 함께 사용하는 PHP 버전으로 변경하십시오.

ESC를 :wq누르고 , 입력하고 , Enter를 누르십시오.

source ~/.bash_profile

어느 PHP

2 Mac 포트 설치

https://www.macports.org/install.php

sudo port install php5-intl 또는 sudo port install php53-intl

cp /opt/local/lib/php/extensions/no-debug-non-zts-20090626/intl.so /Applications/MAMP/bin/php5.3/lib/php/extensions/no-debug-non-zts-20090626/

{take a good look at the folder names that u use the right ones}

3 확장 추가

이제 php.ini파일에 확장자를 추가 하십시오.

extension=intl.so

유용한 링크 : https://gist.github.com/irazasyed/5987693


짧은 대답 : php_cli.ini에서 intl 확장을 활성화하십시오. 그의 의견에 대해 @ndm에게 감사드립니다.


오류 메시지는 문제가 무엇인지 명확하게 나타냅니다. intl 확장이 설치되어 있어야합니다.

1 단계 : 편한 버전의 PHP 설치

$ sudo apt-get 설치 php-intl

2 단계:

XAMPP Server intl 확장이 이미 설치되어있는 경우이 확장을 활성화하여 php.ini 파일의 줄 아래에서 주석 처리를 제거해야합니다. Php.ini 파일은 c : \ xampp \ php \ php.ini 또는 XAMPP를 설치 한 위치에 있습니다.

주석 해제 전 :

; extension = php_intl.dll; extension = php_mbstring.dll

주석 해제 후 :

extension = php_intl.dll extension = php_mbstring.dll


In my case I was not actually trying to run cakephp locally, I was just trying to get it to auto update locally using composer (because I am playing with writing plugins that you install with composer). Since I don't actually even run it locally I could simply ignore requirements by adding the --ignore-platform-reqs flag.

php composer.phar update --ignore-platform-reqs


For Ubuntu terminal:

Please follow the steps:

Step-1:

cd ~

Step -2: Run the following commands

sudo apt-get install php5-intl

Step -3: You then need to restart Apache

sudo service apache2 restart


For Windows(XAMPP) :

Find the Php.ini file:

/xampp/php/php.ini

Update the php.ini file with remove (;) semi colon like mentioned below:

;extension=php_intl.dll to extension=php_intl.dll

and save the php.ini file.

After that you need to

Restart the xampp using xampp control.


In my case, my running php version is 7.1.x on mac OSX . I installed intl command using brew install php71-intl. Placing extension=intl.so inside php.ini was no effect at all. Finally i looked for extension installed directory and there i saw intl.so and placed that path (extension=/usr/local/Cellar/php71-intl/7.1.11_20/intl.so) to my php.ini file and it solved my problem.


MAKE this

In XAMPP, intl extension is included but you have to uncomment extension=php_intl.dll in php.ini and restart the server through the XAMPP Control Panel. In WAMP, the intl extension is “activated” by default but not working. To make it work you have to go to php folder (by default) C:\wamp\bin\php\php{version}, copy all the files that looks like icu*.dll and paste them into the apache bin directory C:\wamp\bin\apache\apache{version}\bin. Then restart all services and it should be OK.

if you use XAMPP do this 1. turn off XAMPP 2. Modifed the php.ini is located in c/:xampp/php/php.ini 3. intl extension is included but you have to uncomment extension=php_intl.dll in php.ini and restart the server through the XAMPP Control Panel.


Intl Means :Internationalization extension which enables programmers to perform UCA-conformant collation and number,currency,date,time formatting in PHP scripts.

To enable PHP Intl with PECL can be used.

pecl install intl

On a plain RHEL/CentOS/Fedora, PHP Intl can be install using yum

yum install php-intl

On Ubuntu, PHP Intl can be install using apt-get

 apt-get install php5-intl

Restart Apache service for the changes to take effect.

That's it


For those who get Package not found error try sudo apt-get install php7-intl then run composer install in your project directory.


I had the same problem in windows The error was that I had installed several versions of PHP and the Environment Variables were routing to wrong Path of php see image example


I'm using Mac OS High Sierra and none of these worked for me. But after searching a lot I found one that worked!

This may seem trivial, but in fact about 2 months ago some clever guys made changes in brew repository, so doing just: brew install php71-intl will show you error with message that such recipe doesn’t exists.

Fortunately, there is. There is temporary fix in another brew repo, so all you have to do is:

brew tap kyslik/homebrew-php
brew install kyslik/php/php71-intl

SOURCE: http://blastar.biz/2018/04/14/how-to-enable-php-intl-extension-for-php-7-1-using-xampp-on-macos-high-sierra/


If you are using latest version Ubuntu 16.04 or later just do

sudo apt-get install php-intl

Then restart your apache

sudo service apache2 restart

참고URL : https://stackoverflow.com/questions/26285280/cakephp-3-0-installation-intl-extension-missing-from-system

반응형