WMS loadparams()

Stuart Eve stuarteve at LPARCHAEOLOGY.COM
Tue Oct 3 08:57:06 EDT 2006


Hi,

I can't see if the request object has numparams > 0 as it seems to crash 
the page as soon as I run the $request->loadparams();

I have checked out my apache logs and can;t see anything wrong in there 
- so I'm not sure whats causing this. When I insert a phpinfo(), I can 
definitely see the right parameters in the QUERY_STRING, I can therefore 
just request the parameters manually from the querystring and then build 
the request object using:

$request->setParameter($grabbed_param,$grabbed_value);

But this seems like it defeats the purpose a bit and it would be much 
more efficient if we cna figure out how to get loadparams() working.

What else do you need to know about my setup?

Thanks in advance

Stuart

Yewondwossen Assefa wrote:
> Stuart,
>
>   I have run this example on windows without a problem. Is there 
> anything set in the request object after the loadparams call (is 
> $request->numparams == 0 ?) Normally the underlying code should get 
> use the REQUEST_METHOD and the QUERY_STRING variables to parse the 
> query string. I think phpinfo() should tell you the values of these 
> parameters.
>
> Later,
>
>
> Stuart Eve wrote:
>> I posted this a couple of weeks ago but no replies so thought I would 
>> try again. I am still having this problem - and am now using 4.10.0-rc1
>>
>> Any thoughts anyone?
>>
>>
>> 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