jwielgos has asked for the wisdom of the Perl Monks concerning the following question:
Output when run from shell is the contents of the GIF file. Output when run as CGI is: SHELL >> /usr/homes/joew/ImageMagick-5.1.1/convert -rotate 90 /tmp/grads_www/meteo_955384773_91.ps /tmp/grads_www/meteo_955384773_91.gif failed on open: /tmp/grads_www/meteo_955384773_91.gif Anyone know what is going on? Or even any ideas on a work-around, or further tests to run? I'm completely stumped. FYI, if you can't tell, I'm using CGI.pm to handle CGI stuff. Thanks very much, -Joesrand (time ^ $$ ^ unpack "%32L*", `ps axww | gzip`); my $image_output = "/tmp/grads_www/" . $function_name . "_" . time + . "_" . int(rand 1000); my $convert_to_gif_string = "/usr/homes/joew/ImageMagick-5.1.1/convert -rotate 90 $image_outpu +t.ps $image_output.gif"; $output .= "SHELL >> $convert_to_gif_string\n"; $output .= `$convert_to_gif_string`; if (open IMAGE_FILE, $image_output . ".gif") { print $query->header('image/gif'); while (<IMAGE_FILE>) { print; } } else { print $query->header('text/plain'); print $output; print "\nfailed on open: $image_output.gif\n"; }
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: mysterious backticks/system() behavior in CGI script
by btrott (Parson) on Apr 10, 2000 at 21:42 UTC | |
Re: mysterious backticks/system() behavior in CGI script
by turnstep (Parson) on Apr 10, 2000 at 21:39 UTC | |
by jwielgos (Initiate) on Apr 11, 2000 at 02:22 UTC | |
Re: mysterious backticks/system() behavior in CGI script
by chromatic (Archbishop) on Apr 10, 2000 at 23:22 UTC |