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.

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

报告相同问题?

悬赏问题

  • ¥15 如何让企业微信机器人实现消息汇总整合
  • ¥50 关于#ui#的问题:做yolov8的ui界面出现的问题
  • ¥15 如何用Python爬取各高校教师公开的教育和工作经历
  • ¥15 TLE9879QXA40 电机驱动
  • ¥20 对于工程问题的非线性数学模型进行线性化
  • ¥15 Mirare PLUS 进行密钥认证?(详解)
  • ¥15 物体双站RCS和其组成阵列后的双站RCS关系验证
  • ¥20 想用ollama做一个自己的AI数据库
  • ¥15 关于qualoth编辑及缝合服装领子的问题解决方案探寻
  • ¥15 请问怎么才能复现这样的图呀