Providing geoscience data globally OneGeology 10 year anniversary in 2017 logo Navigation
Main content
Bottom links


Home > How to serve a OneGeology WMS > Setting up a MapServer WMS > Configuring your MapServer WMS > Missing magic string Missing magic string

When running a GetFeatureInfo request with the info_format set as text/html, you will get an error like the below, if you do not include a magic string in each of your HTML template documents.

Content-type: text/xml isValidTemplate(): Web application error. Missing magic string, template-file doesn’t look like a MapServer template.

You need to add <!-- MapServer Template --> to the top of ALL templates.

Example the exemplar template query footer.html is:

<!-- MapServer Template -->

The recently updated exemplar service kits include this NEW requirement, but those updating from older services might miss this.

More information on this and related issues. (

Section last modified: 11 June 2013


OneGeology © 2017. This site is hosted by the British Geological Survey but responsibility for the content of the site lies with OneGeology not with the British Geological Survey. Questions, suggestions, or comments regarding the contents of this site should be directed to the OneGeology administration.