如何将国际扩展升级到 ICU 4+在 OS X 10.7 Lion 和 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 上的国际。但是当我尝试使用 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
我能够使用 PHP 5.3.6 编译 intl.so,但是当我将该文件放入 php_extensions 目录中时,PHP 根本无法识别 intl。我想在我上次的尝试中,我尝试使用 ICU 4.0.1 来编译它,但我也尝试了一些其他版本,例如 4.8.1 或 4.6.1。目前是否有可能在 10.7 上使用 PHP 5.3.8 编译 ICU?
I am running OS X 10.7 Lion with Zend Server CE 5.5 (and therefore PHP 5.3.8). When I try to setup a new Symfony2 project the configuration checker warns me to upgrade the intl extension to ICU 4+.
I followed the instructions I found in another StackOverflow Post, mainly this blog post about upgrading intl on Lion. But when I try to compile the extension with PHP 5.3.8. I get the following error:
$ 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
I was able to compile intl.so with PHP 5.3.6 but when I put that file in my php_extensions directory, PHP does not recognize intl at all. I think in my last attempt I tried to compile it with ICU 4.0.1, but I also tried some other versions like 4.8.1 or 4.6.1. Is there any possibility to compile ICU with PHP 5.3.8 on 10.7 at the moment?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要多少 Zend Server?如果根本没有,那么你可以尝试 http://php-osx.liip.ch/附带 ext/intl 以及 Symfony2 所需的一切
How much do you need Zend Server? If not at all, then you could try http://php-osx.liip.ch/ which comes with ext/intl and everything else you need for Symfony2