<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">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 class="moz-txt-link-freetext" 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<xmp style="color: rgb(0, 0, 0); font-size: 13px;
font-style: normal; font-variant: normal; font-weight: normal;
letter-spacing: normal; line-height: normal; orphans: auto;
text-align: start; text-indent: 0px; text-transform: none;
widows: auto; word-spacing: 0px; -webkit-text-stroke-width:
0px;"></xmp>Regards,<br>
<br>
Seth<br>
<br>
On 16/12/2014 14:28, Jörg Thomsen wrote:<br>
</div>
<blockquote cite="mid:5490336F.3020303@mapmedia.de" type="cite">
<pre wrap="">Hi Seth,
are you very sure the path C:/Mapserver/apps/pms/tmp exists? Please
check. Also you can use debug-mode to see where mapserver wants to write
the image and perhaps cannot.
the directory has to be writable, but with windows this should not be a
problem.
And you have to define the alias in apache for the tmp-directory like
ALIAS /tmp C:/Mapserver/apps/pms/tmp
<Directory C:/Mapserver/apps/pms/tmp>
....
</Directory>
Jörg
Am 16.12.2014 um 14:03 schrieb geographika:
</pre>
<blockquote type="cite">
<pre wrap="">Hi list,
Until now I have been using MapServer as a WMS server. I've only
recently been trying out the CGI controls, which would be very handy for
a reporting application.
The MapServer tutorials refer several times to saving temporary images
using the mode=browse. At
<a class="moz-txt-link-freetext" href="http://demo.mapserver.org/tutorial/section3.html">http://demo.mapserver.org/tutorial/section3.html</a> the map images
generated in these tutorials refer to image files on the web server (so
are not generated dynamically). E.g.
<a class="moz-txt-link-freetext" href="http://demo.mapserver.org/ms_tmp/EX1.9_141873269321745.png">http://demo.mapserver.org/ms_tmp/EX1.9_141873269321745.png</a>
I've tried to set this up in MapServer 6.4 without success. I've set up
parameters in the WEB section as follows:
WEB
IMAGEPATH "C:/Mapserver/apps/pms/tmp"
# Also tried "tmp/"
IMAGEURL "tmp/"
TEMPLATE "reports/test.html"
However no images are ever created in this folder when using a request
such as <a class="moz-txt-link-freetext" href="http://localhost/mapserver/?LAYERS=mylayer&mode=browse">http://localhost/mapserver/?LAYERS=mylayer&mode=browse</a>
<a class="moz-txt-link-rfc2396E" href="https://localhost/mapserver/?LAYERS=mylayer&mode=browse"><https://localhost/mapserver/?LAYERS=mylayer&mode=browse></a>
The template contains file names such as tmp/MyMap14187343292752.png but
these never seem to be written to disk. How can these images be persisted?
I know I could use mode=map to generate an image, but I want to create
legends etc. all with a single request.
Regards,
Seth
--
web:<a class="moz-txt-link-freetext" href="http://geographika.co.uk">http://geographika.co.uk</a>
twitter: @geographika
_______________________________________________
mapserver-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
</pre>
</blockquote>
<pre wrap="">
_______________________________________________
mapserver-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
</pre>
</blockquote>
<br>
</body>
</html>