<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2658.24">
<TITLE>RE: [UMN_MAPSERVER-USERS] Premature end of script headers: mapserv</TITLE>
</HEAD>
<BODY>

<P><FONT SIZE=2>What happens if you use PassEnv in the Apache httpd.conf to pass on the LD_LIBRARY_PATH to the CGI? After that restart Apache ofcourse.</FONT></P>

<P><FONT SIZE=2>PassEnv LD_LIBRARY_PATH</FONT>
</P>

<P><FONT SIZE=2>Best regards,</FONT>
<BR><FONT SIZE=2>Bart</FONT>
</P>

<P><FONT SIZE=2>-----Oorspronkelijk bericht-----</FONT>
<BR><FONT SIZE=2>Van: UMN MapServer Users List</FONT>
<BR><FONT SIZE=2>[<A HREF="mailto:MAPSERVER-USERS@LISTS.UMN.EDU">mailto:MAPSERVER-USERS@LISTS.UMN.EDU</A>]Namens Juan Mari Celihueta</FONT>
<BR><FONT SIZE=2>Verzonden: woensdag 10 mei 2006 10:42</FONT>
<BR><FONT SIZE=2>Aan: MAPSERVER-USERS@LISTS.UMN.EDU</FONT>
<BR><FONT SIZE=2>Onderwerp: Re: [UMN_MAPSERVER-USERS] Premature end of script headers:</FONT>
<BR><FONT SIZE=2>mapserv</FONT>
</P>
<BR>

<P><FONT SIZE=2>Hi Grabiel:</FONT>
</P>

<P><FONT SIZE=2>I don't think that is a file permission issue. All the permissions are </FONT>
<BR><FONT SIZE=2>ok. The problem is that I cannot execute cgi-bin scripts from the </FONT>
<BR><FONT SIZE=2>browser. Indeed, I have a 'test-cgi' script that shows the same error. </FONT>
<BR><FONT SIZE=2>Moreover I have written a very simple cgi-bin test script and got the </FONT>
<BR><FONT SIZE=2>same error. This scripts is simply:</FONT>
</P>

<P><FONT SIZE=2>#!/bin/sh</FONT>
</P>

<P><FONT SIZE=2>echo</FONT>
<BR><FONT SIZE=2>echo &quot;test&quot;</FONT>
</P>

<P><FONT SIZE=2>Now I am checking the apache httpd.conf file for permissions to execute </FONT>
<BR><FONT SIZE=2>cgi-bin scripts.</FONT>
</P>

<P><FONT SIZE=2>Thanks anyway, and tell me please if you have any other suggestion.</FONT>
</P>

<P><FONT SIZE=2>Regards,</FONT>
</P>

<P><FONT SIZE=2>Juan.</FONT>
</P>

<P><FONT SIZE=2>grabiel escribió:</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; Hi</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp; Juan</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Check the file permission for mapserv and the path that preceeds it. If your mapserv is in /usr/local/apache/cgibin then</FONT></P>

<P><FONT SIZE=2>&gt; set the file permission(write) for others etc. using chmod comand.</FONT>
<BR><FONT SIZE=2>&gt; If ur file permission is not set to write for each directory or mapserv then you may get the error that u have mentioned.</FONT></P>

<P><FONT SIZE=2>&gt; Best of luck</FONT>
<BR><FONT SIZE=2>&gt; Grabiel </FONT>
<BR><FONT SIZE=2>&gt; *************************************************************</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; Hi all,</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; I have compiled successfully mapserver 4.8.3 under Solaris 8:</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; $ ./mapserv -v</FONT>
<BR><FONT SIZE=2>&gt; MapServer version 4.8.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP </FONT>
<BR><FONT SIZE=2>&gt; OUTPUT=PDF OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=FREETYPE </FONT>
<BR><FONT SIZE=2>&gt; SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT SUPPORTS=WFS_SERVER INPUT=TIFF </FONT>
<BR><FONT SIZE=2>&gt; INPUT=EPPL7 INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; However, when I put the mapserv file into the cgi-bin apache directory </FONT>
<BR><FONT SIZE=2>&gt; and try to open the file directly without any parameters from my </FONT>
<BR><FONT SIZE=2>&gt; browser, instead of the message expected ('No query information to </FONT>
<BR><FONT SIZE=2>&gt; decode. QUERY_STRING is set, but empty.'), I get an 'Internal Server </FONT>
<BR><FONT SIZE=2>&gt; Error' message. If I look the apache logfile I get this: 'Premature end </FONT>
<BR><FONT SIZE=2>&gt; of script headers: mapserv'.</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; The LD_LIBRARY_PATH in the apache environment is:</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; LD_LIBRARY_PATH=/usr/local/lib:/usr/local/ssl/lib</FONT>
<BR><FONT SIZE=2>&gt; export LD_LIBRARY_PATH</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; Could anyone help me?</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; Regards,</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; Juan.</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt; _______________________________________________</FONT>
<BR><FONT SIZE=2>&gt; No banners. No pop-ups. No kidding.</FONT>
<BR><FONT SIZE=2>&gt; Make My Way&nbsp; your home on the Web - <A HREF="http://www.myway.com" TARGET="_blank">http://www.myway.com</A></FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;</FONT>
<BR><FONT SIZE=2>&gt;&nbsp;&nbsp; </FONT>
</P>

<BR>


Disclaimer
************************************************************************
Aan dit bericht kunnen geen rechten worden ontleend. Dit bericht is
uitsluitend bestemd voor de geadresseerde. Als u dit bericht per abuis
hebt ontvangen, wordt u verzocht het te vernietigen en de afzender te 
informeren. Wij adviseren u om bij twijfel over de juistheid of de 
volledigheid van de mail contact met afzender op te nemen.

This message shall not constitute any rights or obligations.
This message is intended solely for the addressee.
If you have received this message in error, please delete it and
notify the sender immediately. When in doubt whether this message
is correct or complete, please contact the sender.
************************************************************************

<BR>
</BODY>
</HTML>