我为php安装了xhprof分析扩展。
除了callgraph.php文件之外,一切都很好,它返回:failed to shell execute cmd=" dot -Tpng"
所以我检查了一下,发现没有安装dot实用程序,所以我安装了它。
它似乎从命令行运行得很好,所以我再次运行了scritp,同样的错误:failed to shell execute cmd=" dot -Tpng"
xhprof文档声明:the callgraph image visualization ([View Callgraph]) feature relies on the presence of Graphviz "dot" utility in your path.
但是我不知道我现在需要做什么,特别是“路径中的实用工具”部分
感谢你们的帮助,谢谢你们
发布于 2014-04-04 19:06:36
如果需要xhprof的绘图功能,请在终端中运行next命令:
sudo apt-get install graphviz发布于 2012-10-12 16:08:35
当我启用error_reporting时,我发现缺少一些配置变量:
function xhprof_generate_image_by_dot($dot_script, $type) {
// get config => yep really dirty - but unobstrusive
global $_xhprof;
$errorFile = $_xhprof['dot_errfile'];
$tmpDirectory = $_xhprof['dot_tempdir'];
$dotBinary = $_xhprof['dot_binary'];在将以下行添加到xhprof_lib/config.php之后,它就可以工作了
$_xhprof['dot_errfile'] = '/home/peniel/var/log/xhprof/error.log';
$_xhprof['dot_tempdir'] = '/home/peniel/var/log/xhprof';
$_xhprof['dot_binary'] = '/usr/bin/dot';发布于 2015-06-01 23:31:55
如果你已经安装了graphviz,由于安全限制,这个错误也会发生。某些功能可能会被禁用。因此,请查看您的日志以获取一些php警告。
例如:
PHP Warning: proc_open() has been disabled for security reasons in /usr/share/php/xhprof_lib/utils/callgraph_utils.php on line 112您需要配置php.ini或security.ini参数disable_functions。
https://stackoverflow.com/questions/2930254
复制相似问题