<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 5.50.4616.200" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#c0c0c0>
<DIV><FONT face=Arial size=2>I am having a problem printing out simple HTMP 
using the mapscript perl mod.</FONT></DIV>
<DIV><FONT face=Arial size=2>This is the only error that I get in my 
logs.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>[Fri Jul 20 10:43:42 2001] [error] [client 
192.168.1.47] Premature end of script headers: /ho</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>&nbsp;Here is some code that I am using. When I 
comment out the 3&nbsp;&nbsp; $map=&nbsp;&nbsp;, $img= and 
mapscript::msSaveImage&nbsp;&nbsp;&nbsp;lines it works. </FONT></DIV>
<DIV><FONT face=Arial size=2>Now, if I comment out the&nbsp; "use CGI"&nbsp; 
code, and NOT the mapscript code, then it works!</FONT></DIV>
<DIV><FONT face=Arial size=2>So I am wondering, is there conflicts with CGI.pm 
and Mapscript.pm ?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>print "Content-type: text/html\n\n";<BR>$mapPath 
="/home/jburnett/maptest";<BR>$imgTemp ="/home/htdocs/tmp";<BR>use 
mapscript;<BR>use CGI;<BR>my $q = new CGI;<BR>my $imgX = 
$q-&gt;param('img.x');<BR>my $imgY = $q-&gt;param('img.y');</FONT></DIV>
<DIV><FONT face=Arial size=2><BR>&nbsp; $map = new mapObj("$mapPath/romney.map") 
or die($!. "::Unable to open mapfile.");<BR>&nbsp; $img = $map-&gt;draw() or 
die('Unable to draw map');<BR>&nbsp; mapscript::msSaveImage($img, 
"$imgTemp/example.gif", $map-&gt;{interlace}, 
$map-&gt;{transparent});</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>print"<BR>&lt;html&gt;&lt;head&gt;&lt;title&gt;Perl 
Mapserver Test&lt;/title&gt;&lt;/head&gt;\n<BR>&lt;body&gt;<BR>&lt;b&gt;$imgX X 
$imgY&lt;/b&gt;&lt;br&gt;<BR>&lt;img src='/tmp/example.gif'&gt;<BR>&lt;form 
action='/cgi-bin/romney.pl' method='post'&gt;<BR>";</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV>Apache/1.3.12 </DIV>
<DIV>Perl v5.6.0</DIV>
<DIV>Slackware 7.1</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>thanks!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>-jim</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>