dongshi3361 2013-10-24 18:56
浏览 42
已采纳

如何使作曲家识别intl php扩展

I'm trying to install some symfony bundles to create an admin tool found in this tutorial: http://www.ens.ro/2012/07/13/symfony2-jobeet-day-12-the-admin-bundle/

I'm using symfony 2.3.* and am using composer for my dependencies as described here: Cannot setup sonata using composer

but when I try to update my symfony buid as described in the above composer file (php composer.phar update) , I get this error:

  • Installation request for sonata-project/intl-bundle dev-master -> satisfiable by sonata-project/intl-bundle[dev-master].
    • sonata-project/intl-bundle dev-master requires ext-intl * -> the requested PHP extension intl is missing from your system.

now I know that the php intl extension is installed because it shows up in my info.php file (pictured here): http://johnpaulwhatnow.com/intl.png

so why does composer/symfony think the intl extension isn't installed?

Specs: Mamp| php 5.4.10| symfony 2.3.6

EDIT: I did find this error in my php error log:

[24-Oct-2013 14:05:11 America/Chicago] PHP Warning: PHP Startup: Unable to load dynamic library '/Applications/MAMP/bin/php/php5.4.10/lib/php/extensions/no-debug-non-zts-20100525/intl.so' - dlopen(/Applications/MAMP/bin/php/php5.4.10/lib/php/extensions/no-debug-non-zts-20100525/intl.so, 9): Symbol not found: _zend_new_interned_string Referenced from: /Applications/MAMP/bin/php/php5.4.10/lib/php/extensions/no-debug-non-zts-20100525/intl.so Expected in: flat namespace in /Applications/MAMP/bin/php/php5.4.10/lib/php/extensions/no-debug-non-zts-20100525/intl.so in Unknown on line 0

Solved

I had to tell my CLI to use mamp's php, which had intl.so installed. I did this by creating a alias: alias phpmamp='/Applications/MAMP/bin/php/php5.4.19/bin/php'

then running the command I needed: phpmamp composer.phar update --prefer-dist

thank you for your answers!

  • 写回答

2条回答 默认 最新

  • dsdt66064367 2013-10-24 22:22
    关注

    Because you probably have two php.ini... one for cli and apache.

    You have to load intl extension in both.

    EDIT

    To find the php.ini that is used when php scripts run from cli use this command in the terminal:

    php -r 'phpinfo();' | grep 'php.ini'
    
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 c程序不知道为什么得不到结果
  • ¥40 复杂的限制性的商函数处理
  • ¥15 程序不包含适用于入口点的静态Main方法
  • ¥15 素材场景中光线烘焙后灯光失效
  • ¥15 请教一下各位,为什么我这个没有实现模拟点击
  • ¥15 执行 virtuoso 命令后,界面没有,cadence 启动不起来
  • ¥50 comfyui下连接animatediff节点生成视频质量非常差的原因
  • ¥20 有关区间dp的问题求解
  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置