<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Thanks Steve. I persevered knowing it
was still a valid use case. <br>
Turns out it was a simple error / misunderstanding on my part.
I've had the MAP STATUS set to OFF for years, and always accessed
layers using WMS/WFS/GeoJSON. <br>
It seems in CGI mode this means no map image is ever created (even
when specifying layers to show). The map did appear in mode=map
however, just not mode=browse. <br>
<br>
Seth<br>
<br>
On 17/12/2014 17:22, Lime, Steve D (MNIT) wrote:<br>
</div>
<blockquote
cite="mid:C549F0496453D842B4DD71AC8188DDC50800684B@055-CH1MPN1-041.055d.mgd.msft.net"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=ISO-8859-1">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:Tahoma;
panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
{font-family:Consolas;
panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:12.0pt;
font-family:"Times New Roman","serif";
color:black;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:blue;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:purple;
text-decoration:underline;}
pre
{mso-style-priority:99;
mso-style-link:"HTML Preformatted Char";
margin:0in;
margin-bottom:.0001pt;
font-size:10.0pt;
font-family:"Courier New";
color:black;}
span.HTMLPreformattedChar
{mso-style-name:"HTML Preformatted Char";
mso-style-priority:99;
mso-style-link:"HTML Preformatted";
font-family:Consolas;
color:black;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri","sans-serif";
color:#1F497D;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">I’m
able to save images using 6.4.1. Just tested it with a
template that uses [img] and [ref]… This is on a Linux
server. --Steve<o:p></o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #B5C4DF
1.0pt;padding:3.0pt 0in 0in 0in">
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext">
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>
[<a class="moz-txt-link-freetext" href="mailto:mapserver-users-bounces@lists.osgeo.org">mailto:mapserver-users-bounces@lists.osgeo.org</a>]
<b>On Behalf Of </b>geographika<br>
<b>Sent:</b> Wednesday, December 17, 2014 6:08 AM<br>
<b>To:</b> <a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
<b>Subject:</b> Re: [mapserver-users] browse mode no
longer saves images?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">Hello again,<br>
<br>
A few more tests with no luck in saving the images to disk
on the server. <br>
Does anyone save images to the server using 6.4? It works
fine on the examples at
<a moz-do-not-send="true"
href="http://demo.mapserver.org/cgi-bin/mapserv">http://demo.mapserver.org/cgi-bin/mapserv</a>?
but these use MapServer 5.6.5<br>
<br>
This applies to [img], [scalebar], [legend] even though
unique filenames are generated in the template output e.g.<br>
<br>
<img src="/tmp/PMS1418817695480.png"><br>
<img src="/tmp/PMSsb1418817695480.png"><br>
<img src="/tmp/PMSleg1418817695480.png"><br>
<br>
I've tried running from the command line to rule out the web
server: <br>
<br>
mapserv -nh
"QUERY_STRING=map=C:/MapServer/apps/pms/mymap.map&LAYERS=Test&mode=browse"<br>
<br>
I also tried to create a new OUTPUTFORMAT to use, setting it
explicitly to use the filesystem (although I'm not sure if
this only applies to OGR formats):<br>
<br>
OUTPUTFORMAT<br>
NAME 'png2'<br>
DRIVER "GDAL/PNG"<br>
MIMETYPE "image/png"<br>
EXTENSION "png"<br>
IMAGEMODE RGBA #All features are rendered against an
initially transparent background.<br>
FORMATOPTION "STORAGE=filesystem"<br>
END<br>
<br>
And then from the command line:<br>
<br>
mapserv -nh
"QUERY_STRING=map=C:/MapServer/apps/pms/mymap.map&LAYERS=Bridges&mode=browse&QFORMAT=png2&SAVEQUERY=true"<br>
<br>
<br>
The logs show the following (with debug set to 5) with no
errors:<br>
<br>
[Wed Dec 17 11:55:42 2014].367000 CGI Request 1 on process
2272<br>
[Wed Dec 17 11:55:42 2014].382000 mapserv request processing
time (msLoadMap not incl.): 0.015s<br>
[Wed Dec 17 11:55:42 2014].382000 msFreeMap(): freeing map
at 0000000002A3A870<o:p></o:p></p>
<p class="MsoNormal">Regards,<br>
<br>
Seth<br>
<br>
On 16/12/2014 14:28, Jörg Thomsen wrote:<o:p></o:p></p>
</div>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre>Hi Seth,<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>are you very sure the path C:/Mapserver/apps/pms/tmp exists? Please<o:p></o:p></pre>
<pre>check. Also you can use debug-mode to see where mapserver wants to write<o:p></o:p></pre>
<pre>the image and perhaps cannot.<o:p></o:p></pre>
<pre>the directory has to be writable, but with windows this should not be a<o:p></o:p></pre>
<pre>problem.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>And you have to define the alias in apache for the tmp-directory like<o:p></o:p></pre>
<pre>ALIAS /tmp C:/Mapserver/apps/pms/tmp<o:p></o:p></pre>
<pre><Directory C:/Mapserver/apps/pms/tmp><o:p></o:p></pre>
<pre> ....<o:p></o:p></pre>
<pre></Directory><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Jörg<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Am 16.12.2014 um 14:03 schrieb geographika:<o:p></o:p></pre>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<pre>Hi list,<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Until now I have been using MapServer as a WMS server. I've only<o:p></o:p></pre>
<pre>recently been trying out the CGI controls, which would be very handy for<o:p></o:p></pre>
<pre>a reporting application.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>The MapServer tutorials refer several times to saving temporary images<o:p></o:p></pre>
<pre>using the mode=browse. At<o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="http://demo.mapserver.org/tutorial/section3.html">http://demo.mapserver.org/tutorial/section3.html</a> the map images<o:p></o:p></pre>
<pre>generated in these tutorials refer to image files on the web server (so<o:p></o:p></pre>
<pre>are not generated dynamically). E.g.<o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="http://demo.mapserver.org/ms_tmp/EX1.9_141873269321745.png">http://demo.mapserver.org/ms_tmp/EX1.9_141873269321745.png</a><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>I've tried to set this up in MapServer 6.4 without success. I've set up<o:p></o:p></pre>
<pre>parameters in the WEB section as follows:<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre> WEB<o:p></o:p></pre>
<pre> IMAGEPATH "C:/Mapserver/apps/pms/tmp"<o:p></o:p></pre>
<pre> # Also tried "tmp/"<o:p></o:p></pre>
<pre> IMAGEURL "tmp/"<o:p></o:p></pre>
<pre> TEMPLATE "reports/test.html"<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>However no images are ever created in this folder when using a request<o:p></o:p></pre>
<pre>such as <a moz-do-not-send="true" href="http://localhost/mapserver/?LAYERS=mylayer&mode=browse">http://localhost/mapserver/?LAYERS=mylayer&mode=browse</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="https://localhost/mapserver/?LAYERS=mylayer&mode=browse"><https://localhost/mapserver/?LAYERS=mylayer&mode=browse></a><o:p></o:p></pre>
<pre>The template contains file names such as tmp/MyMap14187343292752.png but<o:p></o:p></pre>
<pre>these never seem to be written to disk. How can these images be persisted?<o:p></o:p></pre>
<pre>I know I could use mode=map to generate an image, but I want to create<o:p></o:p></pre>
<pre>legends etc. all with a single request.<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Regards,<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>Seth<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre>--<o:p></o:p></pre>
<pre>web:<a moz-do-not-send="true" href="http://geographika.co.uk">http://geographika.co.uk</a><o:p></o:p></pre>
<pre>twitter: @geographika<o:p></o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre><o:p> </o:p></pre>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>mapserver-users mailing list<o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
</blockquote>
<pre><o:p> </o:p></pre>
<pre>_______________________________________________<o:p></o:p></pre>
<pre>mapserver-users mailing list<o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><o:p></o:p></pre>
<pre><a moz-do-not-send="true" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a><o:p></o:p></pre>
<pre><o:p> </o:p></pre>
</blockquote>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</blockquote>
<br>
</body>
</html>