Opened 18 years ago

Closed 16 years ago

#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)

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 (2)

comment:1 by stuarteve@…, 18 years ago

Sorry forgot to say I am using 4.10beta3 on Suse 10.1 with Apache and PHP5

comment:2 by dmorissette, 16 years ago

Description: modified (diff)
Resolution: duplicate
Status: newclosed

Were you using PHP as an Apache module (as opposed to PHP in CGI mode)? If yes then your problem is very likely a duplicate of ticket #1975 and we should close as DUPLICATE.

If not then I'd suggest you re-test with a more recent MapServer (v5.2 or 5.3-dev) to see if the issue is still present. It may well have been fixed already.

I'll close as duplicate for now. Please reopen with more details if you were not using PHP as an Apache module.

Note: See TracTickets for help on using tickets.