[mapserver-users] browse mode no longer saves images?

geographika geographika at gmail.com
Wed Dec 17 04:08:04 PST 2014


Hello again,

A few more tests with no luck in saving the images to disk on the server.
Does anyone save images to the server using 6.4? It works fine on the 
examples at http://demo.mapserver.org/cgi-bin/mapserv? but these use 
MapServer 5.6.5

This applies to [img], [scalebar], [legend] even though unique filenames 
are generated in the template output e.g.

<img src="/tmp/PMS1418817695480.png">
<img src="/tmp/PMSsb1418817695480.png">
<img src="/tmp/PMSleg1418817695480.png">

I've tried running from the command line to rule out the web server:

mapserv -nh 
"QUERY_STRING=map=C:/MapServer/apps/pms/mymap.map&LAYERS=Test&mode=browse"

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):

     OUTPUTFORMAT
         NAME 'png2'
         DRIVER "GDAL/PNG"
         MIMETYPE "image/png"
         EXTENSION "png"
         IMAGEMODE RGBA #All features are rendered against an initially 
transparent background.
         FORMATOPTION "STORAGE=filesystem"
     END

And then from the command line:

mapserv -nh 
"QUERY_STRING=map=C:/MapServer/apps/pms/mymap.map&LAYERS=Bridges&mode=browse&QFORMAT=png2&SAVEQUERY=true"


The logs show the following (with debug set to 5) with no errors:

[Wed Dec 17 11:55:42 2014].367000 CGI Request 1 on process 2272
[Wed Dec 17 11:55:42 2014].382000 mapserv request processing time 
(msLoadMap not incl.): 0.015s
[Wed Dec 17 11:55:42 2014].382000 msFreeMap(): freeing map at 
0000000002A3A870

Regards,

Seth

On 16/12/2014 14:28, Jörg Thomsen wrote:
> 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:
>> 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
>> http://demo.mapserver.org/tutorial/section3.html the map images
>> generated in these tutorials refer to image files on the web server (so
>> are not generated dynamically). E.g.
>> http://demo.mapserver.org/ms_tmp/EX1.9_141873269321745.png
>>
>> 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 http://localhost/mapserver/?LAYERS=mylayer&mode=browse
>> <https://localhost/mapserver/?LAYERS=mylayer&mode=browse>
>> 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:http://geographika.co.uk
>> twitter: @geographika
>>
>>
>>
>>
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20141217/36fba336/attachment-0001.html>


More information about the mapserver-users mailing list