OGR failing on Linux with Premature end of script headers

Frank Warmerdam warmerdam at POBOX.COM
Thu May 18 15:43:36 EDT 2006


McGraw, Joanne wrote:
> LAYER NAME "ecozones" DATA "ecozones"
> 
> #    CONNECTION "/ms4w_1.4.0/Apache/htdocs/dev1/data/ecozones.shp" #
> CONNECTIONTYPE OGR #    DATA "SELECT * FROM ecozones"
> 
> : END
> 
> In the browser, when I enter the following URL with the above definition,
> the image appears fine: 
> http://host/cgi-bin/mapserv?map=/server_path/Apache/htdocs/map_nojoin.map&mode=map&layer=ecozones
> 
> 
> However, if I comment the 'DATA "ecozones"' line and uncomment the lines
> referring to OGR, the image displays correctly from a Windows server; so,
> I'm fairly confident the syntax in the file is fine. But, the same map file
> (with a different path to the ecozones.shp file obviously) gives the
> "Premature end of script headers" error.
> 
> Any pointers as to how I can identify what is causing the error are greatly
> appreciated. I'm stuck!

Joanne,

You might want to try "shp2img" on your map file as it will generally give
you better error messages.  In fact, I usually see specific messages for
missing shared libraries in my Apache error_log, so I'm surprised you don't
see more details.  Perhaps an old OGR (libgdal.so) is getting picked up
in your case and this is causing a crash without details.

Good luck,
-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org



More information about the mapserver-users mailing list