Graphviz Issue Tracker
Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0001486graphvizDotpublic2008-11-20 09:282011-04-28 04:03
ReporterRafal 
Assigned ToArif Bilgin 
PrioritynormalSeveritymajorReproducibilityalways
StatusclosedResolutionfixed 
PlatformOSx86-Windows-Vista 64OS Version
Summary0001486: Format: "dot" not recognized. Use one of: dia hpgl mif mp pcl pic vtx
Description



Normally when I'm runing dot.exe with -T"dot", there is no any problem.
But when I'm using PEAR GraphViz.php library which executing following command:
exec('dot -T"dot" -o"D:\\wamp\\tmp\\gra1A8.tmp.dot" "D:\\wamp\\tmp\\gra1A8.tmp" 2>&1', NULL, NULL) D:\wamp\bin\php\php5.2.6\PEAR\Image\GraphViz.php:369
It's generating error:
Format: "dot" not recognized. Use one of: dia hpgl mif mp pcl pic vtx



There was something about it here:
https://mailman.research.att.com/pipermail/graphviz-interest/2008q2/005258.html [^]
and here:
https://mailman.research.att.com/pipermail/graphviz-interest/2008q2/005314.html [^]
But still it isn't fixed.
Additional Information

<CD>
Backtrace:
    0.4535 19404976 -> Image_GraphViz->renderDotFile($dotfile = 'D:\\wamp\\tmp\\gra1A8.tmp', $outputfile = 'D:\\wamp\\tmp\\gra1A8.tmp.dot', $format = 'dot', $command = NULL) D:\wamp\bin\php\php5.2.6\PEAR\Image\GraphViz.php:303
    0.4536 19406072 -> file_exists('D:\\wamp\\tmp\\gra1A8.tmp') D:\wamp\bin\php\php5.2.6\PEAR\Image\GraphViz.php:343
                                     >=> TRUE
    0.4537 19406112 -> file_exists('D:\\wamp\\tmp\\gra1A8.tmp.dot') D:\wamp\bin\php\php5.2.6\PEAR\Image\GraphViz.php:351
                                     >=> FALSE
    0.4538 19406032 -> escapeshellarg('dot') D:\wamp\bin\php\php5.2.6\PEAR\Image\GraphViz.php:365
                                     >=> '"dot"'
    0.4538 19406016 -> escapeshellarg('D:\\wamp\\tmp\\gra1A8.tmp.dot') D:\wamp\bin\php\php5.2.6\PEAR\Image\GraphViz.php:366
                                     >=> '"D:\\wamp\\tmp\\gra1A8.tmp.dot"'
    0.4539 19405848 -> escapeshellarg('D:\\wamp\\tmp\\gra1A8.tmp') D:\wamp\bin\php\php5.2.6\PEAR\Image\GraphViz.php:367
                                     >=> '"D:\\wamp\\tmp\\gra1A8.tmp"'
    0.4539 19405920 -> exec('dot -T"dot" -o"D:\\wamp\\tmp\\gra1A8.tmp.dot" "D:\\wamp\\tmp\\gra1A8.tmp" 2>&1', NULL, NULL) D:\wamp\bin\php\php5.2.6\PEAR\Image\GraphViz.php:369
                                     >=> 'Format: "dot" not recognized. Use one of: dia hpgl mif mp pcl pic vtx'
    0.4849 19406088 -> clearstatcache() D:\wamp\bin\php\php5.2.6\PEAR\Image\GraphViz.php:371
                                     >=> NULL
    0.4849 19406088 -> file_exists('D:\\wamp\\tmp\\gra1A8.tmp.dot') D:\wamp\bin\php\php5.2.6\PEAR\Image\GraphViz.php:372
                                     >=> FALSE
                                   >=> FALSE
                                 >=> FALSE
</CD>

[erg]
The root cause is that dot cannot find the graphviz bin directory, in order to find the config file.
On Windows, this is done by using operating system calls to find the directory containing the gvc dll,
which is the same directory containing the config file. Somehow the PEAR code gets dot running
and into the gvc library, but causes the directory lookup to fail. This type of call works fine in other
scripting systems.

As a workaround, you can set the environment variable GVBINDIR to be
the path where the config file is found.

The problems mentioned in the mailing list were either fixed or
irrelevant.

[rafal] So I understand that there was some change in the newer version?
Because when I've downgraded to previous version i.e.
graphviz-win-2.20.1.bin.tar.gz (by replacing graphviz binaries)
it started working fine without touching PHP/PEAR

[rafal] Yes, I've tested it and it's problem between version:
http://www.graphviz.org/pub/graphviz/stable/windows/graphviz-2.20.3.msi [^]
and
http://www.graphviz.org/pub/graphviz/stable/windows/graphviz-win-2.20.2.bin.tar.gz [^]
Even now 2.20.3 it's crashing (see \<A HREF="b1523.jpg"\>attachment\</A\>), when replace with
2.20.2 it's working fine.
<CD>
07/07/2008 23:21 7,168 dot.exe
08/10/2008 02:27 41,991 dot.exe.bad
</CD>
And size of files difference it's quite big.
TagsNo tags attached.
AUXILLARY-FILEShttp://www.graphviz.org/bugs/b1523.jpg [^]
DATE-FIXED
FIX-COMMENT
FORMER-ID1523
INPUT-FILE
OUTPUT-FILE
STATUS-COMMENTFixed (6 Feb 2009)
VERSION     2.20.3
Attached Files

- Relationships

-  Notes
There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2011-04-28 04:03 user1 New Issue
2011-04-28 04:03 user1 Assigned To => Arif Bilgin


MantisBT 1.2.5[^]
Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker