Preslav I think this 2-level loop was typical for earlier versions of Mapserver, sometime in version 5.6 they should have switched to another mechanism. I'm not sure if the various subversions of 5.6.x launch the query in the same way. In my opinion this main version was messed up for the query part and so I would either use 5.4 or 6.0.
p.mapper does work correctly with Mapserver 6 only since its release 4.2 because MS 6 introduced a lot of changes to the PHP Mapscript parts. I would post your observations to the Mapserver mailing list with a simple example and the DB log report. BTW: The "Notice" parts just ignore, I would disable this log level in the php.ini since it only will cause problems, I use error_reporting = E_ALL & ~E_NOTICE Armin On 25/01/2012 00:49, Preslav Konstantinov wrote: > Dear Armin, > > I'm a colleague of Zlatomir working on the same issue. Just wanted to > provide two more observations that could possibly give a better clue > about what the problem is. > > 1. A typical sequence of error messages in the apache error log is: > > [Wed Jan 25 00:51:42 2012] [error] [client 78.234.54.90] PHP Fatal > error: [MapServer Error]: msQueryByPoint(): No matching record(s) > found.\n in /var/www/html/ > smes/incphp/query/squery.php on line 102, referer: > http://smes.asde-bg.org/map.phtml > [Wed Jan 25 00:51:44 2012] [error] [client 78.234.54.90] PHP Notice: > Undefined property: Query::$query in > /var/www/html/smes/incphp/query/query.php on line 342, referer: > http://smes.asde-bg.org/map.phtml > [Wed Jan 25 00:51:44 2012] [error] [client 78.234.54.90] PHP Notice: > Undefined property: Query::$query in > /var/www/html/smes/incphp/query/query.php on line 362, referer: > http://smes.asde-bg.org/map.phtml > [Wed Jan 25 00:51:44 2012] [error] [client 78.234.54.90] PHP Notice: > Undefined property: Query::$query in > /var/www/html/smes/incphp/query/query.php on line 269, referer: > http://smes.asde-bg.org/map.phtml > > 2. After enabling query logging in MySQL, I observed the following > strange sequence of queries: > > SELECT `centertype`, `tvm`, `name_cyr`, `name_en`, `id`, `ekatte`, > `mun_code`, `district_c`, `perim_m`, `area_m2`, `num_setl`, `perm_adr`, > `pres_adr`, `x_coord`, `y_coord` FROM `municipality` WHERE x_coord > > 569671.03494131 AND x_coord < 577723.048620631 AND y_coord > > 4781425.85156742 AND y_coord < 4789477.86524674 > > SELECT `centertype`, `tvm`, `name_cyr`, `name_en`, `id`, `ekatte`, > `mun_code`, `district_c`, `perim_m`, `area_m2`, `num_setl`, `perm_adr`, > `pres_adr`, `x_coord`, `y_coord` FROM `municipality` WHERE ekatte = 0 > > SELECT `centertype`, `tvm`, `name_cyr`, `name_en`, `id`, `ekatte`, > `mun_code`, `district_c`, `perim_m`, `area_m2`, `num_setl`, `perm_adr`, > `pres_adr`, `x_coord`, `y_coord` FROM `municipality` WHERE ekatte = 1 > > and so on. > > Apparently the first one retrieves the features in a given rectangle and > after that they are queried again one by one iterating over consecutive > values of the 'ekatte' field. This field is unique and is defined as the > FID in the definition of the OGR virtual layer[*]. These queries will > certainly return nothing, as these are not the real values of the field. > > [*] > <OGRVRTDataSource> > <OGRVRTLayer name="municipalities"> > <SrcDataSource>MySQL:******,user=***,password=***,tables=municipality</SrcDataSource> > <SrcLayer>municipality</SrcLayer> > <FID>ekatte</FID> > <GeometryType>wkbPoint</GeometryType> > <GeometryField encoding="PointFromColumns" x="x_coord" y="y_coord"/> > </OGRVRTLayer> > </OGRVRTDataSource> > > Thank you very much for your willingness to help. > Preslav > ------------------------------------------------------------------------------ Keep Your Developer Skills Current with LearnDevNow! The most comprehensive online learning library for Microsoft developers is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, Metro Style Apps, more. Free future releases when you subscribe now! http://p.sf.net/sfu/learndevnow-d2d _______________________________________________ pmapper-users mailing list pmapper-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pmapper-users