• notice
  • Congratulations on the launch of the Sought Tech site

xhprof installed graphviz and reported an error failed to execute cmd "dot -Tpng"

    Using XHProf we definitely need to view its powerful graphical statistical results analysis graph, and xhprof is done with dot For drawing, in the xhprof_lib/utils/callgraph_utils.php file in the xhprof program installation package, you can see the CMD command of the connector in the method function xhprof_generate_image_by_dot().

    What is Dot? dot is a drawing tool suitable for programmers.Allows you to draw some flowcharts with a few lines of code.

    dot itself is a tool in the Graphviz toolkit.Graphviz is a drawing tool developed by several famous people from Bell Labs.It provides a "what you want is what you get" concept.It uses dot language to write scripts and draw graphics, which is simple and easy to understand.We use a text file to describe the relationship of graphics through dot syntax, and then use dot to generate the final graphics.dot is responsible for laying out the graphics we describe.Even if there are many graphic objects and the relationship is very complicated, dot can lay out them very clearly.The dot file syntax is very simple and can be written manually like a program, but it is often generated by other programs.

    If we did not install dot (that is, install Graphviz) when using XHProf, the following error may be reported:
Error: graphviz-php*' #PHP’s package.     After installing the xhprof graphical analysis interface, this error will not appear, but this error may be reported:
failed to execute cmd \" dot -Tpng\"

    I thought that dot was not installed well, or dot was not installed completely.Found some answers.But none of them helped me solve it.Finally, I started with the xhprof program and looked at it myself.The program is as follows:

100 function xhprof_generate_image_by_dot(< span class="pln">$dot_script /pre>     This error is reported on line 130, if it is not on line 121, it will be reported as standard error.It can be seen that the execution of this proc_open method was unsuccessful.So I thought of the disable function in the php configuration file: find the php configuration file: remove the proc_open method in disable_functions, restart php to solve the problem.

/pre>     This error is reported on line 130, if it is not on line 121, it will be reported as standard error.It can be seen that the execution of this proc_open method was unsuccessful.So I thought of the disable function in the php configuration file: find the php configuration file: remove the proc_open method in disable_functions, restart php to solve the problem.

Tags

Technical otaku

Sought technology together

Related Topic

0 Comments

Leave a Reply

+