[mapserver-users] MapScript wrapper for WxS

Peter Hopfgartner peter.hopfgartner at r3-gis.com
Wed Feb 17 01:16:08 PST 2010


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 




More information about the MapServer-users mailing list