[fusion-users] Known problems with mapserver 5.6.6-6

Julian Bogdani jbogdani at gmail.com
Mon Nov 21 12:38:27 EST 2011


Hello all
many thanks for your help. If it's useful I can provide some more strack trace for the different versions.
I've resolved an issue with selection I had with Fusion running on Mapserver 5.6.1.
I don't know if it's a bug, but it worked for me. The problem was the following.
I was having different output results using different order of layers in the mapfile, not in visualization but in querying. I was testing it on a small development server with only 8GB disk space. My used space grew up suddenly because Fusion and mapscript were writing the same warning error to the apache log. Firebug said that Query.php was working untill it was stop by the default 30'' timeout, but mapscrit still continued to write the warning on the apache log, as I could see using tail.
I was able to reproduce this error in different situations, but the most common was the usage of more then 2 raster images (no difference which format).
Everything was normal using query with mapfiles having up to 2 raster (I tested it even with a mapfile with no vectors); adding the third image in the mapfile provoked the error I explained before.
I think the problem was a conflict in fusion/layers/MapServer/php/Query.php, lines 192-201.
There is a loop using as incremental variable $i and the name of this variable is probably the main error that causes an endless loop: this for cycle is already inside another for cycle (starting at line 178) that uses as incremental variable $i.
The fix is to change the second variable from $i to $ii (or other):
Here is the code (lines 191-201):

$bRasterMaxSet = 0;
    for ($ii=0;$ii<$nCount; $ii++)
    {
        $aKeyVal = explode("=", $aProcessings[$ii]);
        if (count($aKeyVal) == 2 && 
            strcasecmp(trim($aKeyVal[0]), "RASTER_QUERY_MAX_RESULT") == 0)
        {
            $bRasterMaxSet = 1;
            break;
        }
    }

If its' useful I'll post some more stack for the still unsolved problem I have with mapserver 5.6.6 (yet another selection problem, as I wrote in a previous email)

-----
Julian Bogdani





On Nov 21, 2011, at 4:06 PM, Michael Adair wrote:

> I did a quick trial of  Fusion with MapServer 6 and it appears that the underlying Mapscript objects have changed so Fusion PHP code needs to be fixed for MapServer 6.  I wouldn't go down that route yet.
> 
> It's hard to say what the issue is without seeing the site, but I would focus on the "parsing error" in your stack trace.
> 
> Mike
> 
> 
> 
> On 21/11/2011 8:39 AM, Paul Spencer wrote:
>> 
>> The likely suspects are usually the PHP and mapserver versions, both could cause problems.  
>> 
>> Just to be sure, have you run shp2img on your map file to ensure that its not some subtle mapfile syntax change that is biting you?  I'd say that in general Fusion should work with 6.0 but I don't think anyone else has tried it yet.  I'm not sure that there were any API changes in PHP mapscript, it is possible.   
>> 
>> Cheers
>> 
>> Paul
>> 
>> 
>> On 2011-11-20, at 9:07 AM, jbogdani wrote:
>> 
>>> Hello list,
>>> I've a working Fusion installation that gets geo-data from a mysql database.
>>> 1) My server configuration (working fine) is the following:
>>> Ubuntu server 10.04.03
>>> Apache 2.2.14
>>> MySQL 5.1.41
>>> PHP 5.3.2-1ubuntu4.10
>>> MapServer 5.6.1 with Mapscript installed
>>> 
>>> 2) But I had serious problems setting on a second server using the following
>>> configuration:
>>> Ubuntu 11.10
>>> Apache 2.2.20
>>> MySQL 5.1.58
>>> PHP 5.3.6-13
>>> MapServer 5.6.6
>>> 
>>> Using the same geo data & the same mapfiles I can see the map but I can
>>> select no feature! Firebug reports the following errors:
>>> "NetworkError: 500 Internal Server Error -
>>> http://localhost/gis/fusion/layers/MapServer/php/Query.php"
>>> Apache log reports:
>>> [Sun Nov 20 15:03:12 2011] [error] PHP Warning:  [MapServer Error]:
>>> msQueryByPoint(): No matching record(s) found.\n in
>>> /home/webgis/www/fusion/layers/MapServer/php/Query.php on line 213
>>> [Sun Nov 20 15:03:12 2011] [error] PHP Warning:  [MapServer Error]:
>>> msLoadMap(): Parsing error near (ENDa):(line 367)\n in
>>> /home/webgis/www/fusion/layers/MapServer/php/Query.php on line 213
>>> [Sun Nov 20 15:03:12 2011] [error] PHP Warning:  [MapServer Error]:
>>> msLoadMap(): Parsing error near (ENDa):(line 367)\n in
>>> /home/webgis/www/fusion/layers/MapServer/php/Query.php on line 213
>>> [Sun Nov 20 15:03:12 2011] [error] PHP Fatal error:  [MapServer Error]:
>>> msQueryByPoint(): No matching record(s) found.\n in
>>> /home/webgis/www/fusion/layers/MapServer/php/Query.php on line 270
>>> 
>>> Working with shapefiles everything seems to work fine. Is it a Fusion
>>> problem, a Mapserver / mapscript problem, or what?
>>> 
>>> 3) Finally no map is shown if Mapserver 6 is installed in the same server
>>> (no. 2). Has Fusion been tested with Mapserver 6.x?
>>> 
>>> 
>>> --
>>> View this message in context: http://osgeo-org.1803224.n2.nabble.com/Known-problems-with-mapserver-5-6-6-6-tp7013710p7013710.html
>>> Sent from the Fusion Users mailing list archive at Nabble.com.
>>> _______________________________________________
>>> fusion-users mailing list
>>> fusion-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/fusion-users
>> 
>> 
>> __________________________________________
>> 
>>    Paul Spencer
>>    Chief Technology Officer
>>    DM Solutions Group Inc
>>    http://research.dmsolutions.ca/
>> 
>> 
>> 
>> _______________________________________________
>> fusion-users mailing list
>> fusion-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/fusion-users
> _______________________________________________
> fusion-users mailing list
> fusion-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/fusion-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/fusion-users/attachments/20111121/5a144be6/attachment-0001.html


More information about the fusion-users mailing list