FaqApache

 

I've installed Debian Graphviz and it works just fine on the command line, but when I execute a Perl/CGI script through Apache, no output is generated.

For example, the code system("/usr/local/bin/dot -Tpng /tmp/tree.dot -o /tmp/tree.png"); produces no file /tmp/tree.png.

As best as we can tell, dot dies with no stdout or stderr messages on Debian systems when run from an Apache cgi program with no HOME set. The workaround is to provide a HOME directory in the Apache userid's environment.

Someone has also suggested using the Perl module for Graphviz.

Greg Brauer from Dreamworks pointed out a different possibility: The problem turned out to be that I was not closing the file descriptor on my temporary dot file before running dot. Graphviz would end up getting a newly-created empty file with nothing in it before the write buffer to the file was flushed. Dot would happily run on that and generate an empty output file without any warnings.

GraphvizWiki: FaqApache (last edited 2008-11-06 03:23:59)

Recent comments