[MapServer-users] Mapserver 8 , PHP map script cannot print image

Vassilis Chatzigiannakis vchatzi at itml.gr
Thu Oct 26 03:25:42 PDT 2023


Dear all,

We are using Mapserver 8.0.1 with PHP and the php_mapscriptng extension.

I am having a hard time outputting the image to the browser.

In the following code snippet, saving to disk works but mapscript.imageObj.write does not output the image in the browser.

header('Content-type: image/png');
$oImg=$oMap->draw();
$oImg->save("/tmp/mswms.png");
$oImg->write();


Do you have a working PHP example of    https://mapserver.org/mapscript/mapscript-api/stub/mapscript.imageObj.html#mapscript.imageObj.write?

Or is there another way of showing the image in the browser?

Best regards,
Vassilis



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20231026/92caf983/attachment.htm>


More information about the MapServer-users mailing list