Drupal白色死亡屏幕

编程入门 行业动态 更新时间:2024-10-27 16:27:23
Drupal白色死亡屏幕 - 没有错误与错误打开(Drupal White Screen of Death - No Errors with Errors turned ON)

我在Drupal中打开了所有错误(error_reporting(-1)),但由于某些原因,大多数错误不会在日志或屏幕上显示。 我可以通过简单地将函数名更改为其他内容来复制问题,并且我期望看到函数不存在错误,但是我只是得到一个白色屏幕。 我已经尝试在Drupal框架之外进行复制,而且我不能 - 所以它让我相信这不是我的PHP(Zend Server / Apache2 / PHP / Windows)的设置,而是在Drupal的某处。

任何想法的人?

I have all errors turned on (error_reporting(-1)) in Drupal, but for some reason most errors do not come through in the logs or on screen. I can replicate the problem by simply changing a function name to something else, and I would expect to see a function doesn't exist error, but I just get a white screen. I have tried replicating this outside of the Drupal framework and I can't - so it leads me to believe it isn't my setup of PHP (Zend Server/Apache2/PHP/Windows) but is in Drupal somewhere...

Any ideas anyone?

最满意答案

我知道这可能会很晚,但它对我有帮助。 大多数时候一个模块会导致WSOD,我不能仅仅禁用模块来测试它是什么,因为我可能在这个过程中丢失了数据。 我所做的是在module.inc中编辑这个函数

function module_invoke_all($hook) { $args = func_get_args(); // Remove $hook from the arguments. unset($args[0]); $return = array(); foreach (module_implements($hook) as $module) { print "Starting loading $module <br />"; $function = $module . '_' . $hook; if (function_exists($function)) { $result = call_user_func_array($function, $args); if (isset($result) && is_array($result)) { $return = array_merge_recursive($return, $result); } elseif (isset($result)) { $return[] = $result; } } print "Finished loading $module <br />"; } return $return; }

我在上面的代码中添加了这两个打印语句,然后刷新页面,没有达到“完成加载$模块”语句的模块是有问题的模块......这是我的情况。

找到模块后,可以进入系统表并查找该模块,将其设置为status = 0并且bootstrap = 0或运行查询:

UPDATE system SET status = 0, bootstrap = 0 WHERE name = 'module_name' LIMIT 1

参考: 调试Drupal白色死亡屏幕(WSOD)

I started to enable/disable modules to see when I could see errors again and limited it to two modules that turned off the error handling... After more investigation I found that in a nusoap.php class error reporting had been turned off because certain errors kept showing (some other developer had turned it off)... Turned it back on, upgraded nusoap.php and now all is working... Thanks for the help all

更多推荐

本文发布于:2023-08-07 14:57:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1464730.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:屏幕   白色   Drupal

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!