Mapserver4.4.2 CGI version: ?Premature end of script headers: mapserv

Joe H. Semon fishingwind at HOTMAIL.COM
Sat May 7 22:21:46 PDT 2005


Hi, all
I've been compiling Mapserver 4.4.2 under a linux box these days.
When using the php_mapscript, I can draw the map successfully.
While using the CGI version, I always get the same problem:
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.
Please contact the server administrator, xxx at xxx.com and inform
them of the time the error occurred, and anything you might have done
that may have caused the error.
More information about this error may be available in the server error log.
Apache/2.0.53 (Unix) PHP/4.3.10 Resin/3.0.12 Server at 127.0.0.1 Port 80

And in /usr/local/apache2/logs/error.log I find this:
"Premature end of script headers: mapserv, referer:
http://127.0.0.1/mapserver/mi.html"

Sounds to be bad configuration of Apache? but I just can't figure out where
I could be wrong. Could someone help me? Any idea will be appreciated!

Thanks very much!!

Info about my mapserver:
[root at Semon root]#/usr/local/apache2/cgi-bin/mapserv -v
MapServer version 4.4.2 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP
OUTPUT=PDF OUTPUT=SWF SUPPORTS=PROJ SUPPORTS=FREETYPE
SUPPORTS=WMS_SERVER SUPPORTS=WFS_SERVER SUPPORTS=WCS_SERVER
INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR INPUT=GDAL INPUT=SHAPEFILE
DEBUG=MSDEBUG
[root at Semon cgi-bin]# ldd mapserv
        libgd.so.2 => /usr/lib/libgd.so.2 (0x4002c000)
        libjpeg.so.62 => /usr/lib/libjpeg.so.62 (0x40079000)
        libfreetype.so.6 => /usr/lib/libfreetype.so.6 (0x40096000)
        libpng.so.3 => /usr/lib/libpng.so.3 (0x400ff000)
        libz.so.1 => /usr/lib/libz.so.1 (0x40128000)
        libXpm.so.4 => /usr/X11R6/lib/libXpm.so.4 (0x40139000)
        libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x40149000)
        libiconv.so.2 => /usr/lib/libiconv.so.2 (0x40228000)
        libproj.so.0 => /usr/lib/libproj.so.0 (0x402ff000)
        libgdal.so.1 => /usr/lib/libgdal.so.1 (0x40333000)
        libming.so => /usr/lib/libming.so (0x4060d000)
        libpq.so.4 => /usr/lib/libpq.so.4 (0x4064a000)
        libgeos.so.2 => /usr/lib/libgeos.so.2 (0x40662000)
        libpthread.so.0 => /lib/tls/libpthread.so.0 (0x40758000)
        libm.so.6 => /lib/tls/libm.so.6 (0x40765000)
        libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x40787000)
        libc.so.6 => /lib/tls/libc.so.6 (0x42000000)
        libfontconfig.so.1 => /usr/lib/libfontconfig.so.1 (0x4083a000)
        libpng12.so.0 => /usr/local/lib/libpng12.so.0 (0x40860000)
        libdl.so.2 => /lib/libdl.so.2 (0x40889000)
        libjasper-1.701.so.1 => /usr/lib/libjasper-1.701.so.1 (0x4088c000)
        libungif.so.4 => /usr/lib/libungif.so.4 (0x408d5000)
        libgeotiff.so => /usr/lib/libgeotiff.so (0x408dd000)
        libtiff.so.3 => /usr/lib/libtiff.so.3 (0x408fe000)
        libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x4094a000)
        libcrypt.so.1 => /lib/libcrypt.so.1 (0x40952000)
        libresolv.so.2 => /lib/libresolv.so.2 (0x4097f000)
        libnsl.so.1 => /lib/libnsl.so.1 (0x40991000)
        /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
        libexpat.so.0 => /usr/lib/libexpat.so.0 (0x409a6000)

Here is my WWW document architecture:
/home/www
    ---mapserver
           ---mi.html
           ---mi38017.map
           ---map.php
           ...

My template HTML file:
<html>

<head><title>MapServer Mi38017 Demo</title></head>

<body bgcolor="#FFFFFF">

<center><h2>MapServer Mi38017 Demo</h2></center>

<p><hr><p>

<form method=GET action="../cgi-bin/mapserv">

<input type="hidden" name="layers" value="all">

<input type="hidden" name="map" value="/home/www/mapserver/mi38017.map">

<input type="hidden" name="zoomdir" value=1>

<input type="hidden" name="zoomsize" value=2>
<input type="hidden" name="map_web_imagepath" value="/home/www/mapserver/tmp/">

<input type="hidden" name="map_web_imageurl" value="../mapserver/tmp/">

<input type="hidden" name="program" value="mapserv">

<input type="hidden" name="root" value="../mapserver/mi.html">

<input type="hidden" name="map_web_template" value="state.html">

<center><input type="submit" value="Visit"></center>

</form>

<p><hr><p>
</body></html>

Regards
Semon



More information about the MapServer-users mailing list