<div>Roland,</div>
<div>&nbsp;</div>
<div>Try this on your DATA stmt:</div>
<div>&nbsp;</div>
<div>DATA &quot;<font face="Courier New">geometry from&nbsp;background <font size="2">as foo using unique &lt;gid&gt; using srid=&lt;your srid&gt;&quot;</font></font></div>
<div><font face="Courier New" size="2">just replace the &lt;gid&gt; name with your&nbsp;oid column and put the number of the srid you're using.</font></div>
<div><font face="Courier New" size="2">Hope&nbsp;this helps.</font></div>
<div><font face="Courier New" size="2"></font>&nbsp;</div>
<div><font face="Courier New" size="2">Regards,</font></div>
<div><font face="Courier New" size="2">Luis</font></div>
<div><br><br>&nbsp;</div>
<div><span class="gmail_quote">2006/7/13, Roland Martin &lt;<a href="mailto:roland.w.martin@gmail.com">roland.w.martin@gmail.com</a>&gt;:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>Hi Luis,<br><br>Thanks for your reply. I don't think that's the problem, but here are some excerpts nonetheless:<br><br><br><span style="FONT-FAMILY: courier new,monospace"><br>&nbsp; LAYER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # this one works 
<br>&nbsp;&nbsp;&nbsp; NAME &quot;Contours&quot;<br>&nbsp;&nbsp;&nbsp; GROUP &quot;Height&quot;<br>&nbsp;&nbsp;&nbsp; STATUS OFF<br>&nbsp;&nbsp;&nbsp; CONNECTIONTYPE postgis<br>&nbsp;&nbsp;&nbsp; CONNECTION &quot;dbname=lba user=postgres password=postgres&quot;<br>&nbsp;&nbsp;&nbsp; DATA &quot;geom from height_data&quot; 
<br>&nbsp;&nbsp;&nbsp; TYPE LINE<br>&nbsp;&nbsp;&nbsp; LABELITEM &quot;height&quot;<br>&nbsp;&nbsp;&nbsp; CLASS<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; EXPRESSION ('[layer_name]' = 'C900LX000')<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 204 51 0<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; LABEL<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FONT sans<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; SIZE small<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 100 100 100 
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; OUTLINECOLOR 255 255 255<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; POSITION auto<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ANTIALIAS false<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; END<br>&nbsp;&nbsp;&nbsp; END<br>&nbsp; END<br><br>&nbsp; LAYER&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; # this one doesn't<br>&nbsp;&nbsp;&nbsp; NAME &quot;Background Drawing&quot; 
<br>&nbsp;&nbsp;&nbsp; GROUP &quot;CAD Drawings&quot;<br>&nbsp;&nbsp;&nbsp; STATUS OFF<br>&nbsp;&nbsp;&nbsp; CONNECTIONTYPE postgis<br>&nbsp;&nbsp;&nbsp; CONNECTION &quot;dbname=lba user=postgres password=postgres&quot;<br>&nbsp;&nbsp;&nbsp; DATA &quot;geometry from background&quot;<br>&nbsp;&nbsp;&nbsp; TYPE LINE 
<br>&nbsp;&nbsp;&nbsp; CLASS<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; COLOR 51 102 0<br>&nbsp;&nbsp;&nbsp; END<br>&nbsp; END<br><br></span>The geometry column names are different because I generated the tables from 2 different sources - but that shouldn't make any difference...<br><br>Cheers, 
<br>&nbsp;</div>
<div><span class="sg">Roland.</span></div>
<div><span class="e" id="q_10c671648a273c64_2"><br><br><br><br>
<div><span class="gmail_quote">On 13/07/06, <b class="gmail_sendername">Luis Treviņo</b> &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:ltrevinoh@gmail.com" target="_blank">ltrevinoh@gmail.com
</a>&gt; wrote:</span> 
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0pt 0pt 0pt 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<div>
<div>Roland:</div>
<div>&nbsp;</div>
<div>Could be the &quot;DATA&quot; sql statement on your map file. It would be easier if you can show part of your map file that involves the postgis layer.</div>
<div>&nbsp;</div>
<div>Regards,</div>
<div>Luis<br><br>&nbsp;</div>
<div><span class="gmail_quote">2006/7/12, Roland Martin &lt;<a onclick="return top.js.OpenExtLink(window,event,this)" href="mailto:roland.w.martin@gmail.com" target="_blank">roland.w.martin@gmail.com</a>&gt;:</span> </div>

<div><span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: rgb(204,204,204) 1px solid">
<div>OK, this is probably yet another stupid query to which I should know the answer... however, I'm on a roll here.<br><br>I've got an application which is intermittently (i.e. most of the time, but not always) throwing a 500 Internal Server Error. The application is almost a direct clone of another which does not exhibit the same error. 
<br><br>I've spent most of the afternoon trying to figure out why this might be, and as far as I can tell, it's something to do with the PostGIS database which holds most of the data. If I remove all the PostGIS layers, it seems to work fine (although interestingly doesn't work if they're all in the map file but turned off - does MapScript try to load the layers regardless?) 
<br><br>The database contains converted CAD (DWG) data with typically stupid contents (meaningless fields, escape characters, etc). I wondered if it might be to do with the sizes of the tables (&gt;30 000 records in each), but dissolving them doesn't seem to have made much difference. At the moment I'm leaning towards thinking it may be because of the aforementioned escape characters (looking down the tables, a number just contain the entry &quot; which might upset things; others start with an asterisk). However, some of the tables causing the issue don't contain anything nearly as nasty. 
<br><br>The error is being thrown on loading the map; approximately 80-90% of the time.<br><br>Also of interest may be the following gunk from the error logs:<br>[Wed Jul 12 16:29:11 2006] [error] [client x] Premature end of script headers: 
php-cgi.exe, referer: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://x/lbia_dev/" target="_blank">http://x/lbia_dev/</a><br>[Wed Jul 12 16:51:08 2006] [error] [client x] Premature end of script headers: 
php-cgi.exe, referer: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://x/lbia_dev/" target="_blank">http://x/lbia_dev/ </a><br>(etc)<br><br>Anyone have any thoughts on this?<br><br>Ta,<br>Roland.<br>
<br><br>MS4W 2.0<br>MapServer 4.8.3<br>Chameleon for MS4W 2.4<br>PgSQL 8.1<br>etc 1.0<br>&nbsp;</div>
<div><span><br clear="all"><br>-- <br>Please note my new email address. Use other addresses at your peril. </span></div></blockquote></span></div>
<div></div><br>&nbsp;</div></blockquote></div><br><br clear="all"><br>-- <br>Please note my new email address. Use other addresses at your peril. </span></div></blockquote></div><br>