WMS loadparams()

Stuart Eve stuarteve at LPARCHAEOLOGY.COM
Wed Sep 20 11:25:13 PDT 2006


Dear all

I am having a bit of trouble using the WxS phpMapscript wrapper. I am 
trying this code as from the example page:

dl('php_mapscript.so');
$request = ms_newOwsRequestObj();
$request->loadparams();
ms_ioinstallstdouttobuffer();
$oMap = ms_newMapobj("mapserver/military.map");
$oMap->owsdispatch($request);
$contenttype = ms_iostripstdoutbuffercontenttype();
$buffer = ms_iogetstdoutbufferstring();
header('Content-type: application/xml');
echo $buffer;
ms_ioresethandlers();

However, all I get is the message (in Firefox) that the connection has 
been reset to the server. After a bit of debug I found it was to do with 
the $request->loadparams() call - by commenting that out and manually 
setting the variables...

$request->setParameter("VeRsIoN","1.1.0");
$request->setParameter("SERVICE","WMS");
$request->setParameter("REQUEST","getcapabilities");

...I get a perfect getcapabilities response. I could I guess manually 
request the variables from the querystring using php and set them, but 
that seems a lot of work!

My URL looks like this 
http://blah.blah.com/wms.php?SERVICE=WMS&VERSION=1.1.1&REQUEST=getcapabilities 


I am using MapServer version 4.10.0-beta3

Anyone got any ideas or have experienced this?

Thanks

Stuart

Stuart Eve
L - P : Archaeology
stuarteve at lparchaeology.com



More information about the MapServer-users mailing list