chakkaln has asked for the wisdom of the Perl Monks concerning the following question:
Address in the browser#!/usr/local/bin/perl use GD; use CGI ':standard'; # This creates a Web GIF image on the fly # create a new image $im = new GD::Image(1000,100); # allocate some colors $white = $im ->colorAllocate(255,255,255); $black= $im ->colorAllocate(0,0,0); $red = $im ->colorAllocate(255,100,0); $blue= $im ->colorAllocate(0,150,255); $yellow= $im ->colorAllocate(255,200,0); $pink= $im ->colorAllocate(150,0,150); $im->filledRectangle(10,5,990,15,$pink); $im->arc(10,10,10,10,0,360,$black); $im->fill(10,10,$white); $im->arc(990,10,10,10,270,90,$black); $im->fillToBorder(990,10,$black,$pink); # Convert the image to GIF and print it on standard output #binmode STDOUT; print "Content-type: image/gif\n\n"; print $im->gif;
Any help will be greatly appreciated.[Fri Jul 29 00:25:57 2005] [error] [client 127.0.0.1] Premature end of + script headers: /home/nagesh /apache/cgi-bin/simpleImage.cgi Can't locate GD.pm in @INC (@INC contains: /usr/local/lib/perl5/5.8.6/ +i686-linux /usr/local/lib/per l5/5.8.6 /usr/local/lib/perl5/site_perl/5.8.6/i686-linux /usr/local/li +b/perl5/site_perl/5.8.6 /usr/ local/lib/perl5/site_perl .) at /home/nagesh/apache/cgi-bin/simpleImag +e.cgi line 3. BEGIN failed--compilation aborted at /home/nagesh/apache/cgi-bin/simpl +eImage.cgi line 3.
fixed formatting by holli
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Trouble with Perl CGI script
by sparkyichi (Deacon) on Jul 28, 2005 at 14:45 UTC | |
by chakkaln (Sexton) on Jul 28, 2005 at 14:50 UTC | |
by ChrisR (Hermit) on Jul 28, 2005 at 15:07 UTC | |
by sparkyichi (Deacon) on Jul 28, 2005 at 16:31 UTC | |
by ChrisR (Hermit) on Jul 28, 2005 at 17:52 UTC | |
| |
|
Re: Trouble with Perl CGI script
by Iron (Scribe) on Jul 28, 2005 at 14:35 UTC | |
by chakkaln (Sexton) on Jul 28, 2005 at 14:45 UTC | |
|
Re: Trouble with Perl CGI script
by Zucan (Beadle) on Jul 28, 2005 at 20:07 UTC |