XAMPP上的Php-intl安装 [英] Php-intl installation on XAMPP
问题描述
我需要在XAMPP上使用我的mac上的扩展程序intl。
所以我按照以下链接:
适用于Mac Lion的XAMPP上的Php-intl安装10.8
http://lvarayut.blogspot.it/2013/09/installing-intl-extension-in-xampp.html
我重新启动总是我的apache服务器,但没有安装扩展。因为如果我启动:
php -m | grep intl #should return'intl'
返回空
$ b b
我无法启动它的命令是为composer和cakephp像这样:
composer create-project --prefer-dist -s dev cakephp / app cakephp3
返回此错误:
安装依赖项(包括require-dev)
您的需求无法解析为一组可安装的软件包。
问题1
- cakephp / cakephp 3.0的安装请求* - dev - >满足cakephp / cakephp [3.0.x-dev]。
- cakephp / cakephp 3.0.x-dev需要ext-intl * - >请求的PHP扩展名intl从您的系统中丢失。
问题2
- cakephp / cakephp 3.0.x-dev需要ext-intl * - >请求的PHP扩展名intl从您的系统中丢失。
- cakephp / bake dev-master要求cakephp / cakephp 3.0.x-dev - >满足cakephp / cakephp [3.0.x-dev]。
- 安装请求cakephp / bake dev-master - >满足于cakephp / bake [dev-master]。
所以我需要解决ext-intl的扩展intl的问题。
有人可以帮我解决这个问题吗?
如何安装此扩展程序?
感谢
p>以下步骤帮助我,如果你使用的是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
- 透过 Homebrew brew install autoconf automake
或 -
运行以下命令
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- *
- 透过 Homebrew brew install autoconf automake
I need to use the extension intl on my mac with XAMPP.
So I have followed this links:
Php-intl installation on XAMPP for Mac Lion 10.8
http://lvarayut.blogspot.it/2013/09/installing-intl-extension-in-xampp.html
I restart always my apache server but isn't installed the extension. Because if I launch:
php -m | grep intl #should return 'intl'
return empty
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].
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?
Thanks
These below steps helped me, 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
Check which php path is set i.e.
root$: which php
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}"
Install icu4c
root$: brew install icu4c
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'
Done
============================
Note:
From extensions list in
/Applications/XAMPP/xamppfiles/etc/php.ini
file Add / Uncommentextension=intl.so
line. And restart Apache. Thanks @pazhynBefore installing "intl" you have to install Autoconf if you have not installed it. Thanks @Digant
- via Homebrew brew install autoconf automake or
by running below commands
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-*
这篇关于XAMPP上的Php-intl安装的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!