<div dir="ltr"><p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US">Hi all !</span></p><p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US">On a brand new debian server with Mapserver 7.6.1 / SWIG PHP Mapscript (+ GDal 3.13 and Proj 7.1.1) I am encountering a strange issue with KML output format. The code and mapfiles I am using were working perfectly on an old Mapserver 6.4 / PHP mapscript installation, I just converted the PHP functions to the SWIG interface.</span></p><p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span style="font-size:11pt"> </span><br></p><p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US">On a simple map file and PHP script the map shows fine, but when I select KML as outputformat ( $map->selectOutputFormat('kml'); ) I get the following error : <b>Fatal error: Uncaught Exception: msDrawMap(): Image handling error. Failed to draw layer named 'Points'. in /home/mapserver/public_html/lib/mapscript.php:2637</b></span></p><p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><i><span lang="EN-US">Stack trace: #0 /home/mapserver/public_html/lib/mapscript.php(2637): mapobj_draw() #1 /home/mapserver/public_html/test/test_points_export.php(15): mapObj->draw() #2 {main} thrown in /home/mapserver/public_html/lib/mapscript.php on line 2637</span></i></p><p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US">There is no detail in the logs concerning that error, and I haven’t found any suitable solution. <b>It works if I remove the LABEL entry from the layer class, but then there is no label…</b></span></p><p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US">I tried with several PHP versions (7.1, 7.3, 7.4) and it always gave me the same result. Everything else works perfectly, I have no issue with Shapefile or Mapinfo output.</span></p><p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US">Does anybody know what is going on ?</span></p><p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US">Here is an example of mapfile that causes this issue :</span></p><p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US"><a href="https://pastebin.com/LFxZ1L9T">https://pastebin.com/LFxZ1L9T</a></span></p><p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US">And the PHP code :</span></p><p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><a href="https://pastebin.com/Tp30bzf3">https://pastebin.com/Tp30bzf3</a><br></p><p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US">Thanks,</span></p><font color="#888888"><p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US"> </span></p><p class="MsoNormal" style="margin:0cm;font-size:11pt;font-family:Calibri,sans-serif"><span lang="EN-US">Bruno</span></p></font></div>