PHP wrapper for mapserv CGI

Richard Greenwood richard.greenwood at GMAIL.COM
Mon Aug 20 16:48:44 EDT 2007


I have been using the an ASP wrapper around mapserv.exe to hide my map
file and do some minor pre-processing that I don't want to do with
JavaScript on the browser. The technique is describe here:
   http://mapserver.gis.umn.edu/docs/howto/wms_server

I'd like to do the same thing, but with PHP. The best I've go so far is:
<?php
  passthru("/www/cgi-bin/mapserv QUERY_STRING=map=/path/to/mapfile.map");
?>
Which uses the QUERY_STRING option to execute mapserv in a "shell
mode". It works, but I wonder if there is a better way, and/or if this
is a bad way to do it.

Thanks,
Rich

-- 
Richard Greenwood
richard.greenwood at gmail.com
www.greenwoodmap.com



More information about the mapserver-users mailing list