-
-
Notifications
You must be signed in to change notification settings - Fork 405
PHP MapScript WMS failing on GetMap requests #5798
Description
PHP Mapscript WMS GetMap requests are not returning any result.
WMS requests going through CGI requests with a static mapfile are successful, e.g.
http://localhost:8080/cgi-bin/mapserv.exe?map=mymap.map&SERVICE=WMS&VERSION=1.3.0&REQUEST=GetMap&FORMAT=image%2Fpng&TRANSPARENT=TRUE&LAYERS=L_01&SRS=EPSG%3A3857&CRS=EPSG%3A3857&STYLES=&WIDTH=1920&HEIGHT=1068&BBOX=-19200000%2C-10680000%2C19200000%2C10680000
However, loading that same mapfile in PHP Mapscript with exact same parameters returns no result.
No errors are written in the MS_ERRORFILE, and owsDispatch command returns 0 (MS_SUCCESS).
Example of code that returns no result.
$oMap = new mapObj("mymap.map");
$request = new OWSRequest();
$request->setParameter('service','WMS');
$request->setParameter('SLD_VERSION','1.1.0');
msIO_installStdoutToBuffer();
$oMap->owsDispatch($request);
$contenttype = msIO_stripStdoutBufferContentType();
header('Content-type: image/png');
msIO_getStdoutBufferBytes();
msIO_resetHandlers();