安装/激活运行 MAMP 的 PHP "intl" 扩展

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/5469412/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-25 21:32:26  来源:igfitidea点击:

Install/activate PHP "intl" extension running MAMP

phpmacosmampphp-extensionsymfony

提问by Manne W

Ok, I'm running MAMP 1.9.5, which includes PHP 5.3.5, on my MacBook Pro.

好的,我正在 MacBook Pro 上运行 MAMP 1.9.5,其中包括 PHP 5.3.5。

The "intl" extension isn't included/activated and I've tried a lot of different ways to install it ("./pecl install intl" doesn't seem to do it), but can't make it work.

“intl”扩展没有包含/激活,我尝试了很多不同的安装方法(“./pecl install intl”似乎没有这样做),但无法使其工作。

I've also "googled my ass of" but can't find any hints.

我也“用谷歌搜索了我的屁股”,但找不到任何提示。

Anyone of you that know how to do it? Or, alternatively, have and advice on how to install my own MySQL+Apache+PHP (and include "intl")?

你们中有人知道怎么做吗?或者,对如何安装我自己的 MySQL+Apache+PHP(并包括“intl”)有意见和建议?

I'm trying to do this to be able to run Symfony2. So if you have any advice on how to install MySQL+Apache+PHP+Symfony2 on Mac, thats also welcome :)

我试图这样做是为了能够运行 Symfony2。因此,如果您对如何在 Mac 上安装 MySQL+Apache+PHP+Symfony2 有任何建议,也欢迎 :)

采纳答案by szemian

I just compiled on mine the other day.

前几天我刚刚编译了我的。

I wrote a self reminder post here: http://szemian.wordpress.com/2011/03/21/compiling-intl-extension-for-mamp/

我在这里写了一个自我提醒的帖子:http: //szemian.wordpress.com/2011/03/21/compiling-intl-extension-for-mamp/

Let me know if you need further explanation. :)

如果您需要进一步解释,请告诉我。:)

回答by antoine129

The best way is to download PHP for OSX at http://php-osx.liip.ch/and then copy the intl.sofile from

最好的方法是在http://php-osx.liip.ch/下载用于 OSX 的 PHP ,然后intl.so

/usr/local/php5-20121126-100332/lib/php/extensions/no-debug-non-zts-20100525/intl.so

to

/Applications/MAMP/bin/php/php5.4.4/lib/php/extensions/no-debug-non-zts-20100525/intl.so

Worked like a charm for me for PHP 5.4

PHP 5.4 对我来说就像一个魅力