problems using graphviz perl module from apache (windows)

From: Sergio (sergio_rotstein_at_yahoo.com)
Date: 03/04/05


Date: 4 Mar 2005 14:57:08 -0800

I'm writing a cgi script that uses graphviz (the dot program) to
generate a graph and I'm banging my head against the wall trying to get
it to work properly. Currently, if I run the script directly from the
command line, it will work properly and generate my graph (which gets
dumped into a file). If I invoke the script as a cgi script within
apache, it runs fine until it calls the as_png() function, at which
point it will die waiting for a result (the destination file is created
but is empty).

I'm running SERVER_SOFTWARE="Apache/2.0.52 (Win32)"
and version 1.8 of the GraphViz module. If I run a printenv.cgi, I get
the following path:

PATH="C:\Program Files\Perl\bin\;C:\Program Files\Reflection;C:\PROGRAM
FILES\THINKPAD\UTILITIES; C:\Program
Files\Java\j2re1.4.2_01\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\System32\Wbem;C:\Oracle\ora81\bin;C:\Program
Files\Oracle\jre\1.1.7\bin;C:\ISIS;C:\PROGRA~1\COMMON~1\MDL
Shared\ISIS;C:\PROGRA~1\ATT\Graphviz\bin;C:\PROGRA~1\ATT\Graphviz\bin\tools"

which does seem to have the correct path settings for dot.exe.

The error that the apache log gives me is: Premature end of script
headers: simplegraph.pl

If I remove the line that calls as_png(), the script runs fine.

Any assistance would be most appreciated. I've searched usenet but to
no avail...

Thanks!

Sergio.



Relevant Pages

  • Re: ssi and Perl/CGI
    ... How do I go about passing variables to the script via include virtual ... I'll give cmd a whirl, though cgi seems to work great if all my page ... content is coming from the CGI script. ...
    (perl.beginners)
  • Re: CGI Question
    ... leftframe.cgi, not javascript. ... > a CGI script (and it's initially called with NO ... > and the right frame contains an HTML file. ...
    (perl.beginners)
  • Re: Slightly OT: Incoming email triggers
    ... > I found a provider who offers Tcl as a scripting language - great ... > - a script gets activated ... The phrase you're looking for is "mail delivery agent," and the question ... you could always .htaccess protect a CGI script that you run which is a ...
    (comp.lang.tcl)
  • Re: perl/cgi exploit with bracketed module names passed in as CGI param
    ... > cgi script prints the raw cgi param value back out, ... which allows to evaluate a string inside of brackets, ... you put your CGI-parameters into a string and run that string through ...
    (comp.lang.perl.misc)
  • Re: root privileges from cgi script?
    ... I require for a staff member to be able to initiate a backup script ... > a chain of backup processes. ... > I would welcome any suggestions on how to do two things from a CGI script; ... > I know suex can't be used because ROOT is specifically not allowed. ...
    (comp.unix.shell)