如何在OS X 10.7 Lion上使用PHP 5.3.8-ZS5.5.0升级intl扩展到ICU 4+


How do I upgrade intl extension to ICU 4+ on OS X 10.7 Lion with PHP 5.3.8-ZS5.5.0

我正在运行OS X 10.7 Lion与Zend Server CE 5.5(因此PHP 5.3.8)。当我尝试设置一个新的Symfony2项目时,配置检查器警告我将intl扩展升级到ICU 4+。

我遵循了我在另一个StackOverflow帖子中找到的说明,主要是这篇关于在Lion上升级intl的博客文章。但当我尝试编译扩展与PHP 5.3.8。我得到以下错误:

$ make
/bin/sh /Users/Florian/Downloads/php-5.3.8/ext/intl/libtool --mode=compile cc -I/usr/local/include -I. -I/Users/Florian/Downloads/php-5.3.8/ext/intl -DPHP_ATOM_INC -I/Users/Florian/Downloads/php-5.3.8/ext/intl/include -I/Users/Florian/Downloads/php-5.3.8/ext/intl/main -I/Users/Florian/Downloads/php-5.3.8/ext/intl -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include  -DHAVE_CONFIG_H  -g -O2   -c /Users/Florian/Downloads/php-5.3.8/ext/intl/php_intl.c -o php_intl.lo 
mkdir .libs
cc -I/usr/local/include -I. -I/Users/Florian/Downloads/php-5.3.8/ext/intl -DPHP_ATOM_INC -I/Users/Florian/Downloads/php-5.3.8/ext/intl/include -I/Users/Florian/Downloads/php-5.3.8/ext/intl/main -I/Users/Florian/Downloads/php-5.3.8/ext/intl -I/usr/include/php -I/usr/include/php/main -I/usr/include/php/TSRM -I/usr/include/php/Zend -I/usr/include/php/ext -I/usr/include/php/ext/date/lib -I/usr/local/include -DHAVE_CONFIG_H -g -O2 -c /Users/Florian/Downloads/php-5.3.8/ext/intl/php_intl.c  -fno-common -DPIC -o .libs/php_intl.o
/Users/Florian/Downloads/php-5.3.8/ext/intl/php_intl.c:490: error: ‘PHP_FE_END’ undeclared here (not in a function)
make: *** [php_intl.lo] Error 1

我能够编译intl。所以在PHP 5.3.6中,但是当我把这个文件放在我的php_extensions目录中时,PHP根本不识别intl。我想在我最后一次尝试中,我试图用ICU 4.0.1编译它,但我也尝试了一些其他版本,如4.8.1或4.6.1。目前是否有可能在10.7上用PHP 5.3.8编译ICU ?

您有多需要Zend Server?如果没有,那么您可以尝试http://php-osx.liip.ch/,它附带ext/intl和Symfony2

所需的所有其他内容。