这是 PHP 的问题吗?未定义的变量:WP 迁移时发生 rawHTML 错误
当我将 WP 迁移到 VirtualBox Centos 机器时,我遇到了大量这些错误:
未定义的变量:rawHTML
我的 PHP 设置不正确吗?我怎么知道?我很迷茫,因为大部分网站看起来都很正常。
我正在从 PHP 5.2 迁移到 5.3 Centos 服务器。
其他错误包括:
注意:调用 has_cap 时使用的参数自 2.0 版起已弃用!
和
注意:wp_register_script 被错误调用。在 wp_enqueue_scripts、admin_enqueue_scripts 或 init 挂钩之前,不应注册或排队脚本和样式。
非常感谢任何帮助
I get a TON of these errors when I migrated my WP to a VirtualBox Centos machine:
Undefined variable: rawHTML
Is my PHP not set up correctly? How can I tell? I'm quite lost because most of the site appears to be normal.
I'm migrating from a PHP 5.2 to a 5.3 Centos server.
Additional errors include:
Notice: has_cap was called with an argument that is deprecated since version 2.0!
and
Notice: wp_register_script was called incorrectly. Scripts and styles should not be registered or enqueued until the wp_enqueue_scripts, admin_enqueue_scripts, or init hooks.
Any help is greatly appreciated
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
可能该错误一直存在,但旧机器上的 PHP 设置为不显示通知级别的错误。比较两台机器上 php.ini 中 error_reporting 的值。
也可能是现在您已将 display_errors 设置为打开,而旧计算机将错误发送到日志文件,或者没有报告它们。
Possibly that error has always been there, but PHP on the old machine was set to not show errors at Notice level. Compare the values for error_reporting in php.ini on the two machines.
It may also be that now you have display_errors set to on, whereas the old machine sent the to the log file, or didn't report them.