间歇性 simplexml_load_file():本地 Joomla 站点上的 I/O 警告

2022-01-06 00:00:00 php joomla

我刚开始在本地主机上运行的 joomla 开发站点的所有页面上出现间歇性错误.

I've just started getting an intermittent error on all pages of a joomla dev site I'm running on localhost.

完整的警告是:

警告:simplexml_load_file():I/O 警告:无法在/site/libraries/joomla/language/language 中加载外部实体/site/language/en-GB/en-GB.xml".php 1354行

奇怪的是它是间歇性的,刷新几次通常就能解决问题.

The strange thing is that it is intermittent and a few refreshes will usually resolve the problem.

是否存在可能导致此问题的代码问题或其他原因?

Is there a code problem that could be causing this or is it something else?

推荐答案

现在还不能确定此修复是否有效,但现在似乎已经修复.

It's early days yet to say conclusively that this fix works but it seems to have fixed it for now.

自从进行此更改后没有看到任何再次发生,因此我可以确认这已经解决了问题.

Haven't seen any reoccurrence since making this change so I can confirm that this has resolved the problem.

libxml_disable_entity_loader(false); 添加到 joomla 的 index.php

add libxml_disable_entity_loader(false); to joomla's index.php

感谢 Joomla 论坛上的 Corneliu 在此主题中的帖子:

Credit goes to Corneliu on the Joomla forum for his post in this thread:

J!3.1.6/3.2 simplexml_load_file, JForm::getInstance 错误

相关文章