<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Thank you for your suggestion Andreas,<br>
<br>
I have run shp2img and unfortunately:<br>
[root@terra tmp]# shp2img -o /tmp/out.png -m
/var/www/html/msmap/dynamicmaps/fibUaBrx.map -e "20.259999999999998
43.16 29.700000000000003 49.2016" -s "1250 800" -l "GranitaJudete
Judete Urban Rural RuralSate buildings fibra fiber-common fiber-STM64
fiber-STM16 fiber-STM4 fiber-STM1 fiber-problems-main
fiber-problems-related fibraProblems"<br>
<b>Segmentation fault</b><br>
<br>
Running the command through strace, it ends up like this:<br>
<br>
........<br>
read(4,
"h\376\237\224O\320;@p\225\4\25\'xG@\264d\270&gt;^\320;@\26"..., 45056)
= 45056<br>
read(4, "\303\362oU\36\206;@BY\237\354isG@\34\271\214\333\37\206"...,
4096) = 4096<br>
_llseek(9, 12288, [12288], SEEK_SET)    = 0<br>
read(9, "                                "..., 4096) = 148<br>
_llseek(4, 1458176, [1458176], SEEK_SET) = 0<br>
read(4, "\25\327\377\332\27\23G@\30\256\23v9|;@\233M%\235\372\22"...,
24576) = 24576<br>
read(4, " A\1$\203\<a class="moz-txt-link-abbreviated" href="mailto:21G@.\245\211Px">21G@.\245\211Px</a> ;@\314\353\330\355\242\21G@\367"...,
4096) = 1784<br>
close(8)                                = 0<br>
munmap(0xb7f36000, 4096)                = 0<br>
close(4)                                = 0<br>
munmap(0xb7f38000, 4096)                = 0<br>
close(9)                                = 0<br>
munmap(0xb7f35000, 4096)                = 0<br>
gettimeofday({1245157506, 462482}, NULL) = 0<br>
gettimeofday({1245157506, 462600}, NULL) = 0<br>
open("/etc/localtime", O_RDONLY)        = 4<br>
fstat64(4, {st_mode=S_IFREG|0644, st_size=798, ...}) = 0<br>
fstat64(4, {st_mode=S_IFREG|0644, st_size=798, ...}) = 0<br>
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f38000<br>
read(4, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\7\0\0\0\7\0"...,
4096) = 798<br>
close(4)                                = 0<br>
munmap(0xb7f38000, 4096)                = 0<br>
gettimeofday({1245157506, 463468}, NULL) = 0<br>
gettimeofday({1245157506, 463535}, NULL) = 0<br>
gettimeofday({1245157506, 463599}, NULL) = 0<br>
gettimeofday({1245157506, 463664}, NULL) = 0<br>
gettimeofday({1245157506, 463734}, NULL) = 0<br>
gettimeofday({1245157506, 463802}, NULL) = 0<br>
gettimeofday({1245157506, 463866}, NULL) = 0<br>
gettimeofday({1245157506, 463934}, NULL) = 0<br>
gettimeofday({1245157506, 464028}, NULL) = 0<br>
<b>open("/var/www/html/msmap/dynamicmaps/../data/Judete.shp",
O_RDONLY|O_LARGEFILE) = 4</b><br>
open("/var/www/html/msmap/dynamicmaps/../data/Judete.shx",
O_RDONLY|O_LARGEFILE) = 8<br>
fstat64(4, {st_mode=S_IFREG|0555, st_size=1484536, ...}) = 0<br>
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f38000<br>
<b>read(4</b>,
"\0\0\'\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\vS|"..., 4096) =
4096<br>
fstat64(8, {st_mode=S_IFREG|0555, st_size=436, ...}) = 0<br>
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f36000<br>
read(8, "\0\0\'\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096) = 436<br>
open("/var/www/html/msmap/dynamicmaps/../data/Judete.dbf",
O_RDONLY|O_LARGEFILE) = 9<br>
fstat64(9, {st_mode=S_IFREG|0555, st_size=12436, ...}) = 0<br>
mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
0) = 0xb7f35000<br>
read(9, "\3k\6\24*\0\0\0\201\0%\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096) = 4096<br>
_llseek(9, 0, [0], SEEK_SET)            = 0<br>
read(9, "\3k\6\24*\0\0\0\201\0%\1\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096) = 4096<br>
_llseek(8, 0, [0], SEEK_SET)            = 0<br>
read(8, "\0\0\'\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"...,
4096) = 436<br>
read(8, "", 4096)                       = 0<br>
_llseek(4, 0, [0], SEEK_SET)            = 0<br>
<b>read(4</b>,
"\0\0\'\n\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\vS|"..., 4096) =
4096<br>
<b>read(4,</b>
"\\T7@By\233\300\226BG@\342\376\n\341\340T7@\266Mo\267\241"..., 49152)
= 49152<br>
<b>read(4,</b> <a class="moz-txt-link-rfc2396E" href="mailto:]\3366@\34\21\376\224+G@g\245\\8\247\3356@6\277\213.\f">"]\3366@\34\21\376\224
+G@g\245\\8\247\3356@6\277\213.\f"</a>..., 4096) = 4096<br>
--- SIGSEGV (Segmentation fault) @ 0 (0) ---<br>
+++ killed by SIGSEGV +++<br>
Process 20970 detached<br>
<br>
<br>
I'm not sure if it faults because it can't read from file handler 4
(Judete.shp), or if it's something else... I also tried by not
specifying Judete in the layer list, but it still dies (while reading
Judete.shp!).<br>
<br>
I will look further into problems with AGG (because it renders fine
with PNG)<br>
<br>
Thank you for your help - now I know where to look.<br>
Regards,<br>
Adrian<br>
<br>
P.S. Ideas are welcome!<br>
<br>
Andreas Albarello wrote:
<blockquote
 cite="mid:0228E12F-794C-4654-A397-D607161AA8C9@territoriumonline.com"
 type="cite"><br>
On 16 Jun 2009, at 14:25, Adrian Popa wrote:
  <br>
  <br>
  <blockquote type="cite">Hello David,
    <br>
    <br>
I got the 500 errors from the http error log file. Unfortunately no
additional information is provided.
    <br>
I added the MS_ERRORFILE and DEBUG statements to my map file and
although the errorfile is created, I don't get any other information
(neither when the map loads perfectly, nor when it dies with premature
end of script headers.
    <br>
    <br>
I read RFC 28 (<a class="moz-txt-link-freetext" href="http://mapserver.org/development/rfc/ms-rfc-28.html">http://mapserver.org/development/rfc/ms-rfc-28.html</a>) and
they specified that the server should be compiled with
-DENABLE_STDERR_DEBUG, so I recompiled mapserver:
    <br>
CFLAGS=-DENABLE_STDERR_DEBUG ./configure  --with-freetype --with-png
--with-agg=../agg-2.5 --with-proj --with-ogr --with-gdal --with-xml2
--with-wfs --with-wcs --with-wmsclient --with-wfsclient --with-postgis
--with-threads --with-sos --with-mygis --with-geos --with-tiff
    <br>
    <br>
I used the new binary and unfortunately nothing changed :(
    <br>
    <br>
My (relevant part of the) mapfile looks like this:
    <br>
    <br>
MAP
    <br>
CONFIG  "MS_ERRORFILE" "/tmp/mapserver.log"
    <br>
CONFIG  "MS_DEBUGLEVEL" "5"
    <br>
DEBUG 5                        ...
    <br>
END
    <br>
    <br>
What else can I try?
    <br>
  </blockquote>
  <br>
Try to bypass the webserver/CGI stuff and launch shp2img directly from
the shell, that should hopefully yield some better output:
  <br>
  <br>
shp2img -o test.png -m mapfile.map
  <br>
  <br>
If you haven't already done so in your mapfile, you might need to add
an image size (-s 500 500) and/or an extent (-e minx miny maxx maxy) to
the above command line options.
  <br>
  <br>
Best regards,
  <br>
--
  <br>
--------------------------------------------------------------------
  <br>
Andreas Albarello
  <br>
Analysis &amp; SW Development
  <br>
  <br>
Territorium Online srl/GmbH
  <br>
Via Buozzi/Buozzistra�e 12 - I 39100 Bolzano/Bozen
  <br>
email: <a class="moz-txt-link-abbreviated" href="mailto:andreas.albarello@territoriumonline.com">andreas.albarello@territoriumonline.com</a>
  <br>
web:   <a class="moz-txt-link-abbreviated" href="http://www.territoriumonline.com">www.territoriumonline.com</a>
  <br>
--------------------------------------------------------------------
  <br>
  <br>
  <br>
</blockquote>
<br>
<br>
</body>
</html>