i installed the xhprof profiling extension for php
Everything is fine except for the callgraph.php file, it returns:
failed to shell execute cmd=" dot -Tpng"
so i checked and the dot utility wasn't installed, so i installed it.
it appears to be running fine from the command line so i ran the scritp again, same error:
failed to shell execute cmd=" dot -Tpng"
the xhprof documentation states:
the callgraph image visualization ([View Callgraph]) feature relies on the presence of Graphviz "dot" utility in your path.
but i don't understand what i need to do now, specifically the "utility in your path" part
Any help appreciated, thanks guys
If you want graphing functions for xhprof run next command in terminal:
sudo apt-get install graphviz
When I enable error_reporting, I see there are some configuration variable are missing:
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'];
After add the following lines to xhprof_lib/config.php, it works
$_xhprof['dot_errfile'] = '/home/peniel/var/log/xhprof/error.log';
$_xhprof['dot_tempdir'] = '/home/peniel/var/log/xhprof';
$_xhprof['dot_binary'] = '/usr/bin/dot';
If you have installed graphviz this error also will occure because of the security restrictions. Some functions may be disabled. So, see your logs for some php warnings.
For example:
PHP Warning: proc_open() has been disabled for security reasons in /usr/share/php/xhprof_lib/utils/callgraph_utils.php on line 112
You need to configure php.ini or security.ini parameter "disable_functions".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With