wordpress迁移到Kangle会访问出现 504 报错 (upstream protocol header size is too big),查阅资料,网上的解释都差不多,无外乎是cookie携带的header太多了,其实是header过大的问题,超出了默认的1k,就会引发上述错信息。在WordPress程序中有独立配置开启了display_errors,把它关闭或者直接修改警告的这个文件/wwwroot/wp-includes/functions.php 1618行:当把is_dir前面加一个@就关了警告,结果就是服务器 cpu 100% 导致宕机,无赖之下翻遍 google 终于找到WordPress官方修复办法:Index: src/wp-includes/functions.php===================================================================--- src/wp-includes/functions.php+++ src/wp-includes/functions.php@@ -1680,6 +1680,10 @@ function wp_mkdir_p( $target ) {// We need to find the permissions of the parent folder that exists and inherit that.$target_parent = dirname( $target );while ( \'.\' != $target_parent && ! is_dir( $target_parent ) ) {+ // Infinite loop protection (see https://core.trac.wordpress.org/ticket/43417)+ if ( dirname( $target_parent ) === $target_parent ) {+ break;+ }$target_parent = dirname( $target_parent );}这个只是临时解决,大家可以借鉴下,希望 WordPress 官方下次更新修正这个问题。
WordPress迁移到Kangle报错解决办法
990
文章来源:当途网
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至23467321@qq.com举报,一经查实,本站将立刻删除;如已特别标注为本站原创文章的,转载时请以链接形式注明文章出处,谢谢!