欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

drupal xhprof 报错 以及 有问题 空白 有大用

warning: array_reverse() expects parameter 1 to be array, null given in /home/wwwroot/aaaaa/public_html/sites/all/modules/xhprof/XHProfRunsFile.inc on line 120.

warning: Invalid argument supplied for foreach() in /home/wwwroot/aaaaa/public_html/sites/all/modules/xhprof/XHProfRunsFile.inc on line 98.

warning: Invalid argument supplied for foreach() in /home/wwwroot/aaaaa/public_html/sites/all/modules/xhprof/xhprof.module on line 257.

So after installing xhprof:

- check your /etc/php.d/xhprof.ini or /etc/php.ini;

- set the xhprof.output_dircorrectly;

- make sure the folder permissions allow your webserver user to write there.


看看 php.ini 中 output_dir 的目录,对于php来讲有没有访问权限


[xhprof]

extension=/www/wdlinux/apache_php-5.5.38/lib/php/extensions/no-debug-non-zts-20121212/xhprof.so

xhprof.output_dir=/home/wwwroot/aaaaa/public_html/xhprof




White screen, when enabling xhprof-module

Hello,

My setup:
windows 7,
xampp-win32-1.8.3-4-VC11,
php 5.5.11,
xhprof dll fromhttp://windows.php.net/downloads/pecl/releases/xhprof/0.10.6/particually: php_xhprof-0.10.6-5.5-ts-vc11-x86
fresh drupal 7.28 without any contributed modules except drupals xhprof-module

I get a white screen, when I am enabling profiling with drupals xhprof-module. I get no php error messages, but "Error messages to display" are enabled in backend and I hadset "display_errors" and "display_startup_errors" to on in php.ini. All message I got from browser is "This webpage is not available". When I am clicking in chrome on the button more I got the following message:

"The connection to localhost was interrupted.
Check your Internet connection
Check any cables and reboot any routers, modems, or other network devices you may be using.
..."

It seems that, apache crashes and reboot??? Because I can disable drupals xhprof-module in the backend of my site, when I have still opend the backend site. After disabling drupals xhprof-module, the site is running again.

If you ask for, I can post last error log of apache. Unfortunately I do not have much knowledge about network, server and so on...

Note: Xhprof is basically working fine. I have tested the example-code from here:http://www.php.net/manual/de/xhprof.examples.php.

Any ideas to solve the problem on windows? Because it worked fine on my ubuntu...

Many greetings
Sabrina


Comments

deanflory’s picture

I'm getting the same WSOD error when enabling XHProf on my server and site. As the original poster mentioned, no error messages, total white screen of death. Something is clearly wrong.

gandalf0’s picture

I am getting an Internal server error shortly after installation with the UI.

After that the xhprof module is shown as installed (and we all know it is!!!). After that nothing is working anymore which is outside of the admin/ path. If I load the frontpage -> Internal server error.

So finally how to use xhprof with drupal? It has been removed from devel and this plugin doesn't seem to work!

leendertdb’s picture

This is a known bug with PHP 5.5 -- it returns a segmentation fault when you enable the XHProf in Drupal which results in a blank page or something like a "err_empty_response" in Google Chrome.

Seehttps://bugs.php.net/bug.php?id=65345.

For the meanwhile to get around this bug you can change line 86 in xhprof/xhprof.module(usually in sites/all/modules or sites/all/modules/contrib) from:

xhprof_enable(XHPROF_FLAGS_CPU+XHPROF_FLAGS_MEMORY

to

xhprof_enable(XHPROF_FLAGS_CPU+XHPROF_FLAGS_MEMORY+XHPROF_FLAGS_NO_BUILTINS);

That should at least get the basic XHProf functionality up and running.

gandalf0’s picture

Thank you. Its definitely true - I am on PHP 5.5 (and xhprof 0.9.2) and if I enable the module via drush I also get a segmentation fault. Unfortunately setting the XHPROF_FLAGS_NO_BUILTINS didn't change anything for me. I tried

xhprof_enable(XHPROF_FLAGS_CPU+XHPROF_FLAGS_MEMORY+XHPROF_FLAGS_NO_BUILTINS);

as well as

xhprof_enable(XHPROF_FLAGS_NO_BUILTINS);

but I still get a segmentation fault. :/



普通分类: