在XAMPP PHP-国际机场安装

问题描述:

我需要使用扩展国际在我的Mac与XAMPP。

I need to use the extension intl on my mac with XAMPP.

所以我跟着这个链接:

Php-intl在安装XAMPP的Mac狮子10.8

http://lvarayut.blogspot.it/ 2013/09 /安装-INTL-扩展功能于xampp.html

我重新启动一直是我的Apache服务器,但没有安装该扩展。因为如果我启动:

I restart always my apache server but isn't installed the extension. Because if I launch:

php -m | grep intl #should return 'intl'

返回空

这是我不能没有它推出的命令是作曲家和CakePHP是这样的:

The command that I can't launch without it is for composer and cakephp like this:

composer create-project --prefer-dist -s dev cakephp/app cakephp3

返回我这个错误:

Return me this error:

Installing dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.

  Problem 1
    - Installation request for cakephp/cakephp 3.0.*-dev -> satisfiable by cakephp/cakephp[3.0.x-dev].
    - cakephp/cakephp 3.0.x-dev requires ext-intl * -> the requested PHP extension intl is missing from your system.
  Problem 2
    - cakephp/cakephp 3.0.x-dev requires ext-intl * -> the requested PHP extension intl is missing from your system.
    - cakephp/bake dev-master requires cakephp/cakephp 3.0.x-dev -> satisfiable by cakephp/cakephp[3.0.x-dev].
    - Installation request for cakephp/bake dev-master -> satisfiable by cakephp/bake[dev-master].

所以我需要扩展国际解决EXT-国际问题。

So I need to solve the problem of ext-intl with the extension intl.

有人可以帮我解决这个问题?
如何安装该扩展?

Can someone help me with this problem? How can I install this extension?

感谢

这下面的步骤帮助我,以防万一,如果你使用的是OSX

These below steps helped me, Just in case if you are using OSX

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


  1. 检查的PHP路径设置,即

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

root$: which php


  • 如果您使用的是Mac上的XAMPP它应该是

  • If you are using xampp on your mac it should be

    /Applications/XAMPP/xamppfiles/bin/php 
    

    但如果

    /usr/bin/php 
    

    您需要更改您的OSX的PHP

    you need to change your OSx php

    root$: PATH="/Applications/XAMPP/xamppfiles/bin:${PATH}" 
    


  • 安装ICU4C

  • Install icu4c

    root$: brew install icu4c 
    


  • 通过PECL安装国际

  • Install Intl via PECL

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


  • 您可以检查,如果国际机场已成功安装

  • You can check if Intl was installed successfully

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


  • 完成

    ============================

    ============================

    请注意:
    /Applications/XAMPP/xamppfiles/etc/php.ini扩展名列表文件添加/取消注释扩展= intl.so 行。并重新启动Apache

    Note: From extensions list in /Applications/XAMPP/xamppfiles/etc/php.ini file Add / Uncomment extension=intl.so line. And restart Apache