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 做个有关计算的小程序
  • ¥15 MPI读取tif文件无法正常给各进程分配路径
  • ¥15 如何用MATLAB实现以下三个公式(有相互嵌套)
  • ¥30 关于#算法#的问题:运用EViews第九版本进行一系列计量经济学的时间数列数据回归分析预测问题 求各位帮我解答一下
  • ¥15 setInterval 页面闪烁,怎么解决
  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化