[mapserver-users] MapScript wrapper for WxS
Pavel Iacovlev
iacovlev.pavel at gmail.com
Wed Feb 17 03:35:08 PST 2010
Yes, and the bug is 3 years old. Setting the variables manually from
$_GET works with no trouble.
On Wed, Feb 17, 2010 at 1:20 PM, Peter Hopfgartner
<peter.hopfgartner at r3-gis.com> wrote:
> Pavel Iacovlev wrote:
>>
>> try using instead of :
>> $request = ms_newOwsrequestObj();
>> $numValues = $request->loadparams();
>>
>> this:
>> $request = ms_newowsrequestobj();
>> foreach ($_GET as $key => $value) {
>> $request->setParameter($key, $value);
>> }
>>
>>
>
> Hi Pavel,
>
> this seems to work, so far. Is this realted to
> http://trac.osgeo.org/mapserver/ticket/1975 ?
>
> Peter
>
> Would it
>>
>> On Wed, Feb 17, 2010 at 11:16 AM, Peter Hopfgartner
>> <peter.hopfgartner at r3-gis.com> wrote:
>>
>>>
>>> Hello
>>>
>>> On a CentOS5, 64 bit machine I have a basic WMS through CGI, which runs
>>> fine.
>>>
>>> I'm trying to wrap this in a PHP script, like in
>>> http://www.mapserver.org/ogc/mapscript.html:
>>> ----
>>> <?php
>>> $request = ms_newOwsrequestObj();
>>> $numValues = $request->loadparams();
>>> /*exampple on how to modify the parameters :
>>> forcing the version from 1.1.1 to 1.1.0 */
>>>
>>> $request->setParameter("map","/data/sites/gisclient/mapset/map/wms_reti.map");
>>>
>>> (...)
>>> ----
>>>
>>> Logging to file I see that it is stops when calling loadparams(). It
>>> returns
>>> a document with 0 bytes.
>>>
>>> On the same installation, the following Python wrapper gives the correct
>>> Capabilities document:
>>>
>>> ----
>>> #!/usr/bin/python
>>>
>>> import mapscript
>>>
>>> req = mapscript.OWSRequest()
>>> req.loadParams()
>>>
>>> map = mapscript.mapObj( '/data/sites/gisclient/mapset/map/wms_reti.map' )
>>> map.OWSDispatch( req )
>>> ----
>>> .
>>>
>>> MapServer is 5.6.1. Trying on a machine with 5.2.2, the PHP script fails,
>>> too.
>>>
>>> Is there anything I am missing, here?
>>>
>>> Thanks,
>>>
>>> Peter
>>>
>>> --
>>>
>>> Dott. Peter Hopfgartner
>>>
>>> R3 GIS Srl - GmbH
>>> Via Johann Kravogl-Str. 2
>>> I-39012 Meran/Merano (BZ)
>>> Email: peter.hopfgartner at r3-gis.com
>>> Tel. : +39 0473 494949
>>> Fax : +39 0473 069902
>>> www : http://www.r3-gis.com
>>>
>>> XING: http://www.xing.com/go/invita/8917535
>>> _______________________________________________
>>> mapserver-users mailing list
>>> mapserver-users at lists.osgeo.org
>>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>>
>>>
>>
>>
>>
>>
>
>
> --
>
> Dott. Peter Hopfgartner
>
> R3 GIS Srl - GmbH
> Via Johann Kravogl-Str. 2
> I-39012 Meran/Merano (BZ)
> Email: peter.hopfgartner at r3-gis.com
> Tel. : +39 0473 494949
> Fax : +39 0473 069902
> www : http://www.r3-gis.com
>
> XING: http://www.xing.com/go/invita/8917535
>
--
http://iap.md, The future is open
More information about the MapServer-users
mailing list