Ticket #1917 (closed defect: duplicate)
loadparams() bug
| Reported by: | stuarteve@… | Owned by: | mapserverbugs |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | MapScript-PHP | Version: | 4.10 |
| Severity: | normal | Keywords: | |
| Cc: |
Description (last modified by dmorissette) (diff)
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.
Change History
Note: See
TracTickets for help on using
tickets.
