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 孟德尔随机化结果不一致
  • ¥15 apm2.8飞控罗盘bad health,加速度计校准失败
  • ¥15 求解O-S方程的特征值问题给出边界层布拉休斯平行流的中性曲线
  • ¥15 谁有desed数据集呀
  • ¥20 手写数字识别运行c仿真时,程序报错错误代码sim211-100
  • ¥15 关于#hadoop#的问题
  • ¥15 (标签-Python|关键词-socket)
  • ¥15 keil里为什么main.c定义的函数在it.c调用不了
  • ¥50 切换TabTip键盘的输入法
  • ¥15 可否在不同线程中调用封装数据库操作的类