j1n3l0 has asked for the wisdom of the Perl Monks concerning the following question:
Hello esteemed monks,
I'm having an image problem with CGI. Essentially I cannot display the image. I checked the Apache logs and saw the following error:
(8)Exec format error: exec of 'gnuplot2.gif' failed, referer: test.cgi
Here is the code for 'test.cgi':
#!/usr/bin/perl -wT use strict; use CGI; my $cgi = new CGI; print $cgi->header(); print $cgi->start_html(qq(Image practice)); print $cgi->img( {-SRC=> 'gnuplot2.gif', -ALIGN=> 'left'}, qq(There should be an image in here somewhere) ); print $cgi->end_html();
To test the validity of the image file 'gnuplot2.gif', I placed it in an HTML document and it works (but only when its in the same directory as the HTML document calling it).
I'm not quite sure what's going on here. This is being developed on a standard LAMP server. Any ideas will be greatly appreciated.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Image problem with CGI [ (8)Exec format error ]
by Fletch (Bishop) on Jun 05, 2007 at 14:09 UTC | |
|
Re: Image problem with CGI [ (8)Exec format error ]
by Moron (Curate) on Jun 05, 2007 at 14:14 UTC | |
by j1n3l0 (Friar) on Jun 05, 2007 at 16:00 UTC |