douhunkuang8955 2017-03-22 14:54
浏览 66
已采纳

CakePHP 3 transliterator_transliterate PHP关于全新安装的警告

I have installed CakePHP 3.4.3 using Composer (their recommended way) and my system meets all of the requirements. Upon installation and basic configuration everything is ticked green.

I've used bin/bake to bake the files for 1 very simple table which only has 5 columns: id, name, url, created, modified

When I go to insert a new record it's giving the following error message:

Warning (2): transliterator_transliterate(): Could not create transliterator with ID "Any-Latin; Latin-ASCII; [\u0080-\u7fff] remove" (transliterator_create: unable to open ICU transliterator with id "Any-Latin; Latin-ASCII; [\u0080-\u7fff] remove": U_INVALID_ID) [CORE/src/Utility/Text.php, line 1070]

I've Googled this but can't find any information I can understand about transliterator_transliterate() (never heard of this either).

As the file this is originating from src/Utility/Text.php is part of the Cake core I feel it's unwise to delve into this or modify it.

Why is this error being shown, what does it mean, and how can I fix it?

If I switch the debug setting to false in config/app.php this hides the message, but I don't feel that's a valid solution as it's complaining about something.

As I say, my system meets all their requirements: PHP 7, centOS, Apache and hasn't had any other errors during installation.

  • 写回答

1条回答 默认 最新

  • douxian3828 2017-03-23 14:09
    关注

    The solution is to install/update the ICU library, which seems to be either missing or too old.

    The requirement for the library was removed from the composer definition lately, and turned into a suggestion, as it caused a lot of trouble for many people with outdated setups. While removing requirements isn't ideal, the fact that only two methods in the core require it seems to have been the justification for it being moved to a suggestion.

    The suggest description makes it rather clear when this library is needed:

    The intl PHP library, to use Text::transliterate() or Text::slug()

    However it doesn't make any statements regarding the required version, which is something that surely could be improved.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥25 由IPR导致的DRIVER_POWER_STATE_FAILURE蓝屏
  • ¥50 有数据,怎么建立模型求影响全要素生产率的因素
  • ¥50 有数据,怎么用matlab求全要素生产率
  • ¥15 TI的insta-spin例程
  • ¥15 完成下列问题完成下列问题
  • ¥15 C#算法问题, 不知道怎么处理这个数据的转换
  • ¥15 YoloV5 第三方库的版本对照问题
  • ¥15 请完成下列相关问题!
  • ¥15 drone 推送镜像时候 purge: true 推送完毕后没有删除对应的镜像,手动拷贝到服务器执行结果正确在样才能让指令自动执行成功删除对应镜像,如何解决?
  • ¥15 求daily translation(DT)偏差订正方法的代码