<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<TITLE>Messaggio</TITLE>

<META content="MSHTML 6.00.2900.2523" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=462030509-07122004>The 
Mapfile is ok, in fact I'm able to show other portions of the map (with the 
"bad" layer activated), and even the entire map.</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN class=462030509-07122004>But 
when I zoom to certain parts of the map (one of them is the extent I reported in 
the previous mail) I get the "Internal Server Error".</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=462030509-07122004></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=462030509-07122004>&nbsp;&nbsp;&nbsp; Daniele</SPAN></FONT></DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=462030509-07122004></SPAN></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial color=#0000ff size=2><SPAN 
class=462030509-07122004></SPAN></FONT>&nbsp;</DIV>
<DIV></DIV>
<DIV><FONT face=Tahoma size=2>-----Messaggio originale-----<BR><B>Da:</B> UMN 
MapServer Users List [mailto:MAPSERVER-USERS@LISTS.UMN.EDU] <B>Per conto di 
</B>Christian Blumer<BR><B>Inviato:</B> luned́ 6 dicembre 2004 
15.39<BR><B>A:</B> MAPSERVER-USERS@LISTS.UMN.EDU<BR><B>Oggetto:</B> Re: 
[UMN_MAPSERVER-USERS] Internal Server Error<BR><BR></DIV></FONT>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
  <DIV><FONT face=Arial color=#000000 size=2>I got the same error due to 
  mistakes in the Mapfile. You should try to check it too. Especially check if 
  the layer definition for the shapefile is correct.</FONT></DIV>
  <DIV><FONT face=Arial color=#000000 size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial color=#000000 size=2>Christian</FONT></DIV>
  <BLOCKQUOTE dir=ltr 
  style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
    <DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
    <DIV 
    style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B> 
    <A title=margottid@COMUNE.LUGO.RA.IT 
    href="mailto:margottid@COMUNE.LUGO.RA.IT">Daniele Margotti</A> </DIV>
    <DIV style="FONT: 10pt arial"><B>To:</B> <A 
    title=MAPSERVER-USERS@LISTS.UMN.EDU 
    href="mailto:MAPSERVER-USERS@LISTS.UMN.EDU">MAPSERVER-USERS@LISTS.UMN.EDU</A> 
    </DIV>
    <DIV style="FONT: 10pt arial"><B>Sent:</B> Monday, December 06, 2004 1:35 
    PM</DIV>
    <DIV style="FONT: 10pt arial"><B>Subject:</B> [UMN_MAPSERVER-USERS] Internal 
    Server Error</DIV>
    <DIV><BR></DIV>
    <DIV><FONT face=Arial size=2><SPAN class=988341312-06122004>Hi 
    list,</SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN class=988341312-06122004>I use CGI 
    MapServer 4.2.3 on a RH9 with Apache 2.0.50:</SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN 
    class=988341312-06122004></SPAN></FONT>&nbsp;</DIV>
    <DIV><FONT face=Arial size=2><SPAN class=988341312-06122004>&lt;!-- 
    MapServer version 4.2.3 OUTPUT=GIF OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP 
    OUTPUT=PDF SUPPORTS=FREETYPE INPUT=EPPL7 INPUT=OGR INPUT=GDAL 
    INPUT=SHAPEFILE --&gt;<BR></SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN class=988341312-06122004>All works, but I 
    have a map that returns an "Internal Server Error" when I try to zoom and 
    show a certain extent with a specific layer.</SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN class=988341312-06122004>I think the 
    problem is due to the shapefile (or a part of it), but... how can I be sure 
    of it?</SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN 
    class=988341312-06122004></SPAN></FONT>&nbsp;</DIV>
    <DIV><FONT face=Arial size=2><SPAN 
    class=988341312-06122004></SPAN></FONT>&nbsp;</DIV>
    <DIV><FONT face=Arial size=2><SPAN class=988341312-06122004>The browser only 
    show the "Internal Server Error" page.</SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN class=988341312-06122004>The Apache error 
    log says: "[Mon Dec 06 07:13:04 2004] [error] [client 172.16.20.4] Premature 
    end of script headers: mapserv"</SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN 
    class=988341312-06122004></SPAN></FONT>&nbsp;</DIV>
    <DIV><FONT face=Arial size=2><SPAN 
    class=988341312-06122004></SPAN></FONT>&nbsp;</DIV>
    <DIV><FONT face=Arial size=2><SPAN class=988341312-06122004>I compiled 
    MapServer with --enable-debug,&nbsp;set "DEBUG TRUE" in the map section of 
    the mapfile, and&nbsp;tried to use shp2img with these 
    results:</SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN class=988341312-06122004>----------<SPAN 
    class=988341312-06122004>----------<SPAN 
    class=988341312-06122004>----------<SPAN 
    class=988341312-06122004>----------<SPAN 
    class=988341312-06122004>----------<SPAN 
    class=988341312-06122004>----------<SPAN 
    class=988341312-06122004>----------<SPAN 
    class=988341312-06122004>------</SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN class=988341312-06122004>[root@redhat 
    cs]# /dati/geobase/bin/shp2img -m cs.map -o /dati/daniele.png -e 2491361 
    4510665 2492415 4511455<BR>[Mon Dec&nbsp; 6 07:24:37 2004].748031 
    msDrawMap(): Layer 0 (Confini_comunali), 0.040s<BR>[Mon Dec&nbsp; 6 07:24:41 
    2004].893212 msDrawMap(): Layer 1 (Base_cartografica), 4.145s<BR>[Mon 
    Dec&nbsp; 6 07:24:41 2004].908452 msDrawMap(): Layer 2 (Edifici), 
    0.015s<BR>[Mon Dec&nbsp; 6 07:24:41 2004].918383 msDrawMap(): Layer 3 
    (Aree_traffico), 0.010s<BR>Segmentation fault</SPAN></FONT></DIV><FONT 
    face=Arial size=2><SPAN class=988341312-06122004>
    <DIV><FONT face=Arial size=2><SPAN class=988341312-06122004>----------<SPAN 
    class=988341312-06122004>----------<SPAN 
    class=988341312-06122004>----------<SPAN 
    class=988341312-06122004>----------<SPAN 
    class=988341312-06122004>----------<SPAN 
    class=988341312-06122004>----------<SPAN 
    class=988341312-06122004>----------<SPAN 
    class=988341312-06122004>------</SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></FONT></DIV>
    <DIV></SPAN></FONT><FONT face=Arial size=2><SPAN 
    class=988341312-06122004>[root@redhat cs]# /dati/geobase/bin/shp2img -m 
    cs.map -o /dati/daniele.png -e 2491361 4510665 2492415 4511455 -l 
    Elementi_stradali<BR>Segmentation fault<BR></DIV>
    <DIV><FONT face=Arial size=2><SPAN class=988341312-06122004>----------<SPAN 
    class=988341312-06122004>----------<SPAN 
    class=988341312-06122004>----------<SPAN 
    class=988341312-06122004>----------<SPAN 
    class=988341312-06122004>----------<SPAN 
    class=988341312-06122004>----------<SPAN 
    class=988341312-06122004>----------<SPAN 
    class=988341312-06122004>------</SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN class=988341312-06122004><SPAN 
    class=988341312-06122004><SPAN class=988341312-06122004><SPAN 
    class=988341312-06122004><SPAN class=988341312-06122004><SPAN 
    class=988341312-06122004><SPAN class=988341312-06122004><SPAN 
    class=988341312-06122004></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></SPAN></FONT>&nbsp;</DIV>
    <DIV></SPAN></FONT><FONT face=Arial size=2><SPAN 
    class=988341312-06122004>When shp2img processes the "bad" layer 
    ('Elementi_stradali'), it exits with a 'Segmentation fault' and without a 
    more explicit error message.</SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN 
    class=988341312-06122004></SPAN></FONT>&nbsp;</DIV>
    <DIV><FONT face=Arial size=2><SPAN class=988341312-06122004>I launched 
    the&nbsp;following command (<FONT face=Arial size=2><SPAN 
    class=988341312-06122004>where "road_elements.shp" is the probably bad 
    shapefile):</SPAN></FONT></SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN class=988341312-06122004>[root@redhat 
    cat_strade]# ogrinfo -al road_elements.shp -spat 2491361 4510665 2492415 
    451145</SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN 
    class=988341312-06122004></SPAN></FONT>&nbsp;</DIV>
    <DIV><FONT face=Arial size=2><SPAN class=988341312-06122004>It returns a 85 
    Kb output with apparently no detected errors.</SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN 
    class=988341312-06122004></SPAN></FONT>&nbsp;</DIV>
    <DIV><FONT face=Arial size=2><SPAN 
    class=988341312-06122004></SPAN></FONT>&nbsp;</DIV>
    <DIV><FONT face=Arial size=2><SPAN class=988341312-06122004>How can I 
    understand where the error lies?</SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN class=988341312-06122004>Is there a more 
    powerful debug tool?</SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN 
    class=988341312-06122004></SPAN></FONT>&nbsp;</DIV>
    <DIV><FONT face=Arial size=2><SPAN class=988341312-06122004>Thank 
    you,</SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN 
    class=988341312-06122004>&nbsp;&nbsp;&nbsp; Daniele</SPAN></FONT></DIV>
    <DIV><FONT face=Arial size=2><SPAN 
  class=988341312-06122004>&nbsp;</DIV></BLOCKQUOTE></BLOCKQUOTE></SPAN></FONT></BODY></HTML>