Ale*_*eri 15 php apache macos cakephp
我需要在我的mac上使用扩展intl和XAMPP.
所以我按照这个链接:
在XAMPP for Mac Lion 10.8上安装Php-intl
http://lvarayut.blogspot.it/2013/09/installing-intl-extension-in-xampp.html
我重新启动我的apache服务器,但没有安装扩展.因为如果我发布:
php -m | grep intl #should return 'intl'
回来空了
没有它我无法启动的命令是对于composer和cakephp这样:
composer create-project --prefer-dist -s dev cakephp/app cakephp3
给我这个错误:
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].
所以我需要用扩展名intl来解决ext-intl的问题.
有人可以帮我解决这个问题吗?我该如何安装此扩展程序?
谢谢
Kun*_*hal 30
以下步骤对我有所帮助,以防您使用OSX
步骤http://www.phpzce.com/blog/view/15/installing-intl-package-on-your-mac-with-xampp
检查哪个php路径设置即
root$: which php
如果您在Mac上使用xampp它应该是
/Applications/XAMPP/xamppfiles/bin/php 
但如果它
/usr/bin/php 
你需要改变你的OSx php
root$: PATH="/Applications/XAMPP/xamppfiles/bin:${PATH}" 
安装icu4c
root$: brew install icu4c 
通过PECL安装Intl
root$: sudo pecl update-channels 
root$: sudo pecl install intl 
您可以检查Intl是否已成功安装
root$: php -m | grep intl #should return 'intl' 
完成
============================
注意:
从/Applications/XAMPP/xamppfiles/etc/php.ini文件添加/取消注释extension=intl.so行中的扩展名列表.并重新启动Apache.谢谢@pazhyn
在安装"intl"之前,如果尚未安装,则必须安装Autoconf.谢谢@Digant
通过运行以下命令
curl -OL http://ftpmirror.gnu.org/autoconf/autoconf-latest.tar.gz
tar xzf autoconf-latest.tar.gz
cd autoconf-*
./configure --prefix=/usr/local
make
sudo make install
cd ..
rm -r autoconf-*
tol*_*uso 13
我在使用Moodle时遇到了问题,我通过以下方式修复了这个问题:

$ cd /Applications/XAMPP/bin使用PHP的包管理器intl通过运行来安装$ sudo ./pecl install intl这应该编译一些东西,如果成功,安装应该完成:
Build process completed successfully
Installing '/Applications/XAMPP/xamppfiles/lib/php/extensions/no-debug-non-zts-20131226/intl.so'
install ok: channel://pecl.php.net/intl-3.0.0
configuration option "php_ini" is not set to php.ini location
You should add "extension=intl.so" to php.ini
$ cd ../etc在那里你将有php.ini你需要添加的内容extension=intl.so在我的系统上,我在第959行之后添加了一行,您可以通过搜索找到php_intl希望这对你有用!
小智 7
我和XAMPP有同样的问题.我尝试了几个答案但没有成功.可以解决降低替代库http://php-osx.liip.ch/.这个库php,已经安装了intl和其他几个包.下载后转到xampp中的httpd.conf和LoadModule php5_module指向/usr/local/php5/libphp5.so中的这些包
| 归档时间: | 
 | 
| 查看次数: | 35714 次 | 
| 最近记录: |