Menu

Graphviz not working

Help
Anonymous
2012-11-21
2012-12-15
  • Anonymous

    Anonymous - 2012-11-21

    Hello,

    I completed install and modified config.inc.php with:
    $g_graphviz= "TRUE";
    $g_graphviz_neato = "c:\\Program Files\\Graphviz 2.28\\bin\\neato.exe";

    Setup check shows: OK: Graphviz enabled, executable 'c:\Program Files\Graphviz 2.28\bin\neato.exe' available

    I have the "extended link", wehn I click it I have the correct page with everything showing up except that I have no graph.

    If I select all ci types and all levels I have an output like:
    Extended Relations-Map (CIs: 16 / Relations.: 18)
    >> Export as PDF
    relations to other CIs

    But no image. Export to pdf says it can find http://localhost/phpcmdb/www/ci_view_pdf.php?ci_id=117

    Is there any log I can check for phpcmdb or for graphviz? Is there any specific version of graphviz needed?

     
  • Michael Scheibe

    Michael Scheibe - 2012-11-21

    First of all let me say sorry, usage of graphviz was never tested on windows.

    Let me shortly explain, how the usage of graphviz inside php-cmdb works.
    1. php-cmdb generates a file with a list of all CI's and relations you selected with the filter settings. This file is stored under the name "ci_ext_<session_id>.dot".
    2. graphviz is called with the dot-file and some more arguments, calculates the position of all CI's and store this in a file named "ci_ext_<session_id>.plain".
    3. php-cmdb read the plain-file and generates two more files: "ci_ext_<session_id>.png" with the image and "ci-ext_<session-id>.map" with the coordinates of all CI's on the image (needed to make the image clickable inside the browser).

    All this files are stored in a temp directory. On Windows usually "C:\Temp". If you have set "$g_cache_dir" in your config.inc.php, this directory is used instead.

    So please have a look inside the temp directory which files are generated and come back with a short note. Thanks.

     
  • Anonymous

    Anonymous - 2012-11-21

    Don't be sorry, you already did a great job! And you are even responding to my question ;)

    Anyway in temp folder (c:\tmp in my case) I see diles (png & map files) generated for the basic "Relations-Map" but no *.dot file or *.plain file, so I guess the problem is before the call of graphviz.

     
  • Anonymous

    Anonymous - 2012-11-21

    Woops I spoke too fast… I have a dot file… Even more if I take this dot file and open it with graphviz "gvedit" tool I can generate the correct graph.

    However I have no *.plain file but a file called "sess_vprn0iqalrj4jmfn2jo8ccq7f1" with no extension so maybe the buil of the plain file is not working properly.

     
  • Michael Scheibe

    Michael Scheibe - 2012-11-21

    Thanks for testing. It seems, that graphviz on Windows needs another argument line. Give me some time to setup a windows system and reproduce this behavior.

     
  • Michael Scheibe

    Michael Scheibe - 2012-11-21

    Hope, I find a short workaround. Try the following:
    Open the file "www/includes/graphviz.inc.php" with a simple text editor (DO NOT USE MS WORD!) and go to line 253 (or search for "neato"). Modify the line as follows (add \" arround the first %s):

    $cmd    = sprintf( "\"%s\" -Tplain %s -o %s", get_property("graphviz_neato"), $dot_filename, $plain_filename );

    Save the file and try again.

    I could make a quick bugfix version, but I saw some problems with php 5.4 and mysql on windows too. So I will try to fix all this things and make a bugfix version one or two weeks ahead.

     
  • Anonymous

    Anonymous - 2012-11-22

    Yep it's working! Thanks again for this great app and great support.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.