[mapserver-dev] PHP Mapscript - Query a Standalone File Geodatabase Table using queryByAttributes

Joseph Jeurissen jjeurissen at houstoneng.com
Mon Oct 8 08:26:45 PDT 2012


Hello,

Has anyone ever queried a standalone file geodatabase table that doesn't have any geometry associated with it?  I am able to query feature classes that have points just fine.   You shouldn't have to define an extent or have geometry if you are just querying the attributes, right?  Every time the script is ran it just returns a 500 status error.  The Apache log only shows: "Premature end of script headers: mapserv.exe".   I am using Mapserver 6.0.3 and PHP 5.3.10.

Here is the relevant PHP code:
                                $map = ms_newMapObj($path);
                                $layer = $map->getLayerByName($info[1]);
                                $layer->set('status', MS_DEFAULT);
                                $layer->set('template', $layer->getMetaData('identify_record'));
                                $layer->queryByAttributes("COUNTY_NO",$COUNTY_NO, MS_SINGLE);
                                $results = $map->processquerytemplate(array(), false);

And here is the mapfile that I am using:
MAP
                NAME 'SSTS_Abandonment'
                STATUS ON
                LAYER
                               NAME SSTS_Abandonment
                               CONNECTIONTYPE OGR
                               CONNECTION 'E:\websites\maps\data\Zoning\Zoning.gdb'
                               DATA 'SSTS_Abandonment'
                               STATUS ON
                                TYPE QUERY
                                METADATA
                                                'identify_record' 'SSTS_Abandonment_identify.html'
                                END
                END #LAYER
END #MAP FILE
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-dev/attachments/20121008/7c3c52e8/attachment-0001.html>


More information about the mapserver-dev mailing list