<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div><span>I think the querying it's doing is looking for metadata. Does this layer map okay? The error you're seeing is essentially "Ack, I'm MapServer and I can't figure out what the hell is going on with this layer!" Some easy stuff to try:</span></div><div><span><br></span></div><div>1) Ensure you can map the data.</div><div>2) Convert your inner query into a view and make sure there is a valid entry in geometry_columns for the view.</div><div>3) Curse aloud to others.</div><div>4) Repost to mailing list if none of the above works.</div><div><br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><div style="font-size: 10pt; font-family: arial, helvetica, sans-serif; "><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><font size="2"
face="Arial"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> Stephen Knox <stephenknox73@gmail.com><br><b><span style="font-weight: bold;">To:</span></b> geomoose-users@lists.sourceforge.net<br><b><span style="font-weight: bold;">Sent:</span></b> Monday, May 2, 2011 7:02 PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [Geomoose-users] Strange PHP error on Query<br></font><br>
<div id="yiv1806485595">Excuse my inexperience but I have another query about getting query functionality to work in GeoMoose. It seems to be querying the database for a few seconds, then I get no Valid Response and the following error in PHP: <br>
httpd: mappostgis.c:1882: msPostGISLayerResultsGetShape: Assertion `layer->layerinfo != ((void *)0)' failed.<br><br>I have the following section of mapbook:<br><br> <service name="search_oas"><br>
<url>php/query.php</url><br> <step type="input"><br><br> <input type="select" name="comparitor0" title="Percentage Travel by UG 2001"><br>
<option value="gt">Greater Than</option><br> <option value="eq">Equal To</option><br> <option value="lt">Less Than</option><br>
</input><br> <input type="user" name="value0" title=""/><br> <input type="hidden" name="highlight" value="true"/><br>
<input type="hidden" name="mode" value="search"/><br><br> <input type="hidden" name="layer0" value="uglines/oas"/><br> <input type="hidden" name="template0" value="itemquery"/><br>
<input type="hidden" name="zoom_to_first" value="false"/><br> <input type="hidden" name="fieldname0" value="per_ttw_lu"/><br> </step><br>
</service><br><br>and the layer definition below:<br><br>LAYER<br>CONNECTIONTYPE postgis<br>NAME "oas"<br>CONNECTION "user=postgres password=postgres dbname=lustations host=localhost"<br>DATA "the_geom from (SELECT gid, the_geom, census_code, ttw_by_lu, (ttw_by_lu::REAL/tot_pop::REAL)*100 as per_ttw_lu, tot_pop FROM oa_data) as foo using srid=27700 using unique gid"<br>
STATUS ON<br>TYPE POLYGON<br><br>METADATA<br>identify_record "identify_oas.html"<br>itemquery "oa_itemquery.html"<br>END<br><br>CLASS<br> STYLE<br> OUTLINECOLOR 0 0 0<br> #COLOR 216 250 138<br>
WIDTH 1<br> END<br>END<br>END<br><br>my oa_itemquery.html looks like this:<br><br><!-- MapServer Template --><br><tr bgcolor="#DEE5EB"><td colspan="2"><b><u>Output Areas</u></b></tr><br>
<tr><br><td align="right"><b>Census Code:</b></td><br><td>[census_code]</td><br></tr><br><tr><br><td align="right"><b>Percentage travel by LU:</b></td><br>
<td>[per_ttw_lu]</td><br></tr><br><tr><br><td>&nbsp;</td><br><td>&nbsp;</td><br></tr><br><br>
</div><br>------------------------------------------------------------------------------<br>WhatsUp Gold - Download Free Network Management Software<br>The most intuitive, comprehensive, and cost-effective network <br>management toolset available today. Delivers lowest initial <br>acquisition cost and overall TCO of any competing solution.<br><a href="http://p.sf.net/sfu/whatsupgold-sd" target="_blank">http://p.sf.net/sfu/whatsupgold-sd</a><br>_______________________________________________<br>Geomoose-users mailing list<br><a ymailto="mailto:Geomoose-users@lists.sourceforge.net" href="mailto:Geomoose-users@lists.sourceforge.net">Geomoose-users@lists.sourceforge.net</a><br><a href="https://lists.sourceforge.net/lists/listinfo/geomoose-users" target="_blank">https://lists.sourceforge.net/lists/listinfo/geomoose-users</a><br><br><br></div></div></blockquote></div></div></body></html>