|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2009-04-28 14:55 UTC] alex dot ilichev at gmail dot com
Description: ------------ Using the xhprof UI (through http://domain.name/callgraph.php?run=49f74baf89433&source=xhprof_foo&all=1), seeing errors like: Error: either we can not find profile data for run_id 49f74baf89433 or the threshold 0.01 is too small or you do not have 'dot' image generation utility installed. Any errors in the apache error_log. Also http://domain.name/index.php?run=49f74baf89433&source=xhprof_foo works perfect Issue only with Callgraph PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Oct 27 01:00:02 2025 UTC |
Had the same error PNG support wasn't te problem for me Don't know what the cause is, anyway my solution was to patch function xhprof_generate_image_by_dot in /pecl-xhprof-0.9.2/xhprof_lib/utils/callgraph_utils.php Function: function xhprof_generate_image_by_dot($dot_script, $type) { $descriptorspec = array( // stdin is a pipe that the child will read from 0 => array("pipe", "r"), // stdout is a pipe that the child will write to 1 => array("pipe", "w"), // stderr is a file to write to 2 => array("file", "/dev/null", "a") ); $cmd = "dot -T".$type; $tmpFileName = '/tmp/'.md5($dot_script); if(file_put_contents($tmpFileName, $dot_script)){ $output = `$cmd $tmpFileName`; unset($tmpFileName); return $output; } print "failed to shell execute cmd=\"$cmd\"\n"; exit(); }I ran into the same error with a working well "dot" installed. Then I found there are some non-ISO extended encoding characters in the output file of xhprof. Try use linux command "file" on your xhprof output file for determine weather there is a encoding issue in it. If it's output looks like "Non-ISO extended-ASCII text, with very long lines, with NEL line terminators", you should do iconv in the callgraph_utils.php eg: $dot_script = iconv("UTF-8", "ASCII//IGNORE", $dot_script); It works for me.