Strange MS beta3 behaviour..

Sture Dingsøyr candalt at ONLINE.NO
Thu Aug 16 07:35:57 EDT 2007


Hello...

Been testing the new beta release of MS4W (beta3), and i have noticed a strange behaviour.

I use a small PHP mapscript to generate a picture. But when I use the mapscriptfunction "set("status", 1)" on a POSTGIS, WMS or WFS layer...the web browser "hangs" for many seconds before the PHP page is finished rendering. 

This behaviour dos not occur when "set("status", 1)" is used on a ESRI SHAPE or a RASTER layer.

I do not know if this is a mapserver or php thing...? I can even see in my ms tmp folder that the GIF file is produced...but the webpage "hangs" for many seconds before it is finished rendered.

Have tested using different web browsers...even using WGET..., so I guess this behavoiur have something to do with MS or PHP?

PS! This does not occur in MS4W 2.2.3... 

I also downloaded MS4W 2.2.4 and the same problem is present there also...

My example PHP looks like this:
<?
//map
$mapObject = ms_newMapObj("mapfile.map");
$mapObject->set("width",1000);
$mapObject->set("height",800);

//Shape - this is OK
$av_digitize_point = $mapObject->getLayerByName("1");
$av_digitize_point->set("status", 1);

//wms - browser hangs!!
//$av_digitize_point = $mapObject->getLayerByName("2");
//$av_digitize_point->set("status", 1);

//wfs - browser hangs!!
//$av_digitize_point = $mapObject->getLayerByName("3");
//$av_digitize_point->set("status", 1);

//raster - this is OK
//$av_digitize_point = $mapObject->getLayerByName("4");
//$av_digitize_point->set("status", 1);

//postgis - browser hangs!!
//$av_digitize_point = $mapObject->getLayerByName("5");
//$av_digitize_point->set("status", 1);

//Draw map image
if (!$mapImage) {
    $mapImage = $mapObject->draw();
}

//save image
$mapImage = $mapImage->saveWebImage(MS_GIF,0 ,0,100);

//image url
$mapImage = "http://" . $SERVER_NAME . $mapImage;

print "<img src=\"".$mapImage."\"/>";
?>


Best Regards 
Sture


More information about the mapserver-users mailing list