Thread cgi und graphviz (12 answers)
Opened by bo at 2006-10-11 12:12

bo
 2006-10-11 16:29
#8896 #8896
User since
2006-05-09
76 Artikel
BenutzerIn
[default_avatar]
ich habe noch was bei den perlmonks gefunden, weiss aber nicht, was ich damit anfangen soll.

GraphViz needs a HOME environment variable to work properly.
Do a SetEnv HOME /tmp/ within you CGI environment and it should work fine after that.

was wollen mir diese zeilen sagen? muss ich das ins apache conf eintragen? wenn ja, wie?

aber warum funktioniert es dann, wenn ich dot.exe über einen system call aus meinem script aufrufe?

Code: (dl )
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use strict;
use warnings;
use GraphViz;
use CGI;

my $q = new CGI();
print $q->header(), $q->start_html();

open my $dot, ">", "tree.dot" || die $!;
print $dot qq(digraph g { graph [] A -> B; C -> B; });
close $dot;

my $cmd = "dot -Tgif tree.dot -o tree.gif";
system($cmd);

print $q->end_html;

View full thread cgi und graphviz