<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Not sure how uncommenting something in the conf from camptocamp would help when we're actually setting MS_MAP_PATTERN in our Dockerfile which relies on the camptocamp one as a base image. I created a github issue for this as well and they advised running </div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Docker run <image> env | grep MS_</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
And I see MS_MAP_PATTERN defined there along with MS_MAPFILE set to what I am expecting. Wouldn't this prove that the environment variables are set correctly?</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> Seth G <sethg@geographika.co.uk><br>
<b>Sent:</b> Tuesday, June 4, 2024 4:32 PM<br>
<b>To:</b> Rob Dennett <Rob.Dennett@twdb.texas.gov>; MapServer Users <mapserver-users@lists.osgeo.org><br>
<b>Cc:</b> Chris Repka <Chris.Repka@twdb.texas.gov><br>
<b>Subject:</b> Re: [MapServer-users] Getting msCGILoadMap(): Web application error. Required configuration value MS_MAP_PATTERN not set.</font>
<div> </div>
</div>
<style type="text/css">
<!--
p.x_MsoNormal, p.x_MsoNoSpacing
{margin:0}
-->
</style>
<div>
<div style="background-color:#ffffff; border-style:solid; border-color:#f43a13; border-width:2pt; font-size:10pt; line-height:12pt; font-family:'Calibri'; color:Red">
<p class="x_MsoNormal" align="center" style="text-align:center; background:#ffffff">
<span style="font-size:12.0pt; font-weight:bold; color:red">External: Beware of links/attachments.
</span></p>
</div>
<br>
<br>
<div>
<div>Hi Rob,<br>
</div>
<div><br>
</div>
<div>You could try uncommenting the MS_MAP_PATTERN in the mapserver.conf [1] file on your Docker image to see if that has an effect.
<br>
</div>
<div><br>
</div>
<div>You should also see a log file named /tmp/init_env that lists all the environment variables used by Apache (including MS_MAP_PATTERN), similar to below:<br>
</div>
<div><br>
</div>
<div>export "MAPSERVER_CONFIG_FILE=/etc/mapserver/mapfiles/mapserver.conf"<br>
</div>
<div>export "MAPSERVER_CATCH_SEGV=1"<br>
</div>
<div>export "HOSTNAME=mapserver"<br>
</div>
<div>export "APACHE_CONFDIR=/etc/apache2"<br>
</div>
<div>export "BUSY_TIMEOUT=300"<br>
</div>
<div>export "MS_ERRORFILE=mapserver-8.0.log"<br>
</div>
<div>export "PWD=/etc/mapserver"<br>
</div>
<div>export "IO_TIMEOUT=40"<br>
</div>
<div>export "HOME=/root"<br>
</div>
<div>export "APACHE_LOG_DIR=/var/log/apache2"<br>
</div>
<div>export "MIN_PROCESSES=1"<br>
</div>
<div>export "APACHE_PID_FILE=/tmp/apache2/apache2.pid"<br>
</div>
<div>export "MS_MAP_PATTERN=^\/etc\/mapserver\/([^\.][-_A-Za-z0-9\.]+\/{1})*([-_A-Za-z0-9\.]+\.map)$"<br>
</div>
<div><br>
</div>
<div>Seth<br>
</div>
<div><br>
</div>
<div>[1] <a href="https://github.com/camptocamp/docker-mapserver/blob/cffc18f12146969ed914834b7eba4b798e9c24d9/runtime/etc/mapserver.conf#L15">
https://github.com/camptocamp/docker-mapserver/blob/cffc18f12146969ed914834b7eba4b798e9c24d9/runtime/etc/mapserver.conf#L15</a><br>
</div>
<div>[2] <a href="https://github.com/camptocamp/docker-mapserver/blob/31594debf18f091ad7ca5cf7126723bc014d9781/runtime/usr/local/bin/start-server#L8">
https://github.com/camptocamp/docker-mapserver/blob/31594debf18f091ad7ca5cf7126723bc014d9781/runtime/usr/local/bin/start-server#L8</a><br>
</div>
<div><br>
</div>
<div id="x_sig62266145">
<div class="x_signature">--<br>
</div>
<div class="x_signature">web:<a href="https://geographika.net">https://geographika.net</a> & <a href="https://mapserverstudio.net">https://mapserverstudio.net</a><br>
</div>
<div class="x_signature">twitter: @geographika<br>
</div>
</div>
<div><br>
</div>
<div>On Tue, Jun 4, 2024, at 11:08 PM, Rob Dennett via MapServer-users wrote:<br>
</div>
<blockquote type="cite" id="x_qt" style="">
<div class="x_qt-elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<div>We're using the camptocamp MapServer image and I just tried changing the base image from 7.6 to 8.0, i.e.<br>
</div>
</div>
<div style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
FROM camptocamp/mapserver:7.6<br>
</div>
<div style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_qt-elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
To <br>
</div>
<div class="x_qt-elementToProof" style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_qt-elementToProof" style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
FROM camptocamp/mapserver:8.0<br>
</div>
<div class="x_qt-elementToProof" style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_qt-elementToProof" style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
in our own Dockerfile and when I try to deploy, We're seeing<br>
</div>
<div class="x_qt-elementToProof" style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_qt-elementToProof" style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
"msCGILoadMap(): Web application error. Required configuration value MS_MAP_PATTERN not set."<br>
</div>
<div class="x_qt-elementToProof" style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_qt-elementToProof" style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
on some endpoints (the ones ending in .map)<br>
</div>
<div class="x_qt-elementToProof" style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_qt-elementToProof" style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
The camptocamp image contains<br>
</div>
<div class="x_qt-elementToProof" style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_qt-elementToProof" style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
ENV MS_MAP_PATTERN=^\\/etc\\/mapserver\\/([^\\.][-_A-Za-z0-9\\.]+\\/{1})*([-_A-Za-z0-9\\.]+\\.map)$<br>
</div>
<div class="x_qt-elementToProof" style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_qt-elementToProof" style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
(<a href="https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85" id="x_qt-LPlnk">https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85</a>)<br>
</div>
<div class="x_qt-elementToProof" style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_qt-elementToProof" style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
and our own overwrites this env var anyway, along with MS_MAPFILE<br>
</div>
<div class="x_qt-elementToProof" style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_qt-elementToProof" style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
These haven't changed and they work fine as long as the base image is 7.6. The changelog mentions MS_MAPFILE, but as mentioned, we do define it.<br>
</div>
<div class="x_qt-elementToProof" style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_qt-elementToProof" style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
(<a href="https://github.com/camptocamp/docker-mapserver/blob/8.0.0/README.md#changelog" id="x_qt-LPlnk714756">https://github.com/camptocamp/docker-mapserver/blob/8.0.0/README.md#changelog</a>)<br>
</div>
<div class="x_qt-elementToProof" style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_qt-elementToProof" style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
Any idea what might be happening?<br>
</div>
<div class="x_qt-_Entity x_qt-_EType_OWALinkPreview x_qt-_EId_OWALinkPreview_1 x_qt-_EReadonly_1">
<div id="x_qt-LPBorder_GTaHR0cHM6Ly9naXRodWIuY29tL2NhbXB0b2NhbXAvZG9ja2VyLW1hcHNlcnZlci9ibG9iLzguMC4wL0RvY2tlcmZpbGUjTDg1" class="x_qt-LPBorder593785" style="width:100%; margin-top:16px; margin-bottom:16px; max-width:800px; min-width:424px">
<table id="x_qt-LPContainer593785" role="presentation" style="padding-top:12px; padding-right:36px; padding-bottom:12px; padding-left:12px; width:100%; border-top-width:1px; border-right-width:1px; border-bottom-width:1px; border-left-width:1px; border-top-style:solid; border-right-style:solid; border-bottom-style:solid; border-left-style:solid; border-top-color:rgb(200,200,200); border-right-color:rgb(200,200,200); border-bottom-color:rgb(200,200,200); border-left-color:rgb(200,200,200); border-top-left-radius:2px; border-top-right-radius:2px; border-bottom-right-radius:2px; border-bottom-left-radius:2px">
<tbody>
<tr valign="top" style="border-spacing:0px">
<td>
<div id="x_qt-LPImageContainer593785" style="margin-right:12px; height:120px; overflow-x:hidden; overflow-y:hidden; width:240px">
<a target="_blank" id="x_qt-LPImageAnchor593785" href="https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85"><img id="x_qt-LPThumbnailImageId593785" alt="" height="120" width="240" style="display:block" src="https://opengraph.githubassets.com/89914d21a14748d29e5eb2cb7cf59e720bd216e41863d0bff2ca0e490950eddd/camptocamp/docker-mapserver"></a><br>
</div>
</td>
<td style="width:100%">
<div id="x_qt-LPTitle593785" style="font-size:21px; font-weight:300; margin-right:8px; font-family:wf_segoe-ui_light,"Segoe UI Light","Segoe WP Light","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; margin-bottom:12px">
<a target="_blank" id="x_qt-LPUrlAnchor593785" href="https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85" style="text-decoration-line:none; text-decoration-style:solid; text-decoration-color:currentcolor">docker-mapserver/Dockerfile at
8.0.0 · camptocamp/docker-mapserver</a><br>
</div>
<div id="x_qt-LPDescription593785" style="font-size:14px; max-height:100px; color:rgb(102,102,102); font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; margin-bottom:12px; margin-right:8px; overflow-x:hidden; overflow-y:hidden">
https://hub.docker.com/r/camptocamp/mapserver/. Contribute to camptocamp/docker-mapserver development by creating an account on GitHub.<br>
</div>
<div id="x_qt-LPMetadata593785" style="font-size:14px; font-weight:400; color:rgb(166,166,166); font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif">
github.com<br>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_qt-_Entity x_qt-_EType_OWALinkPreview x_qt-_EId_OWALinkPreview x_qt-_EReadonly_1">
<div id="x_qt-LPBorder_GTaHR0cHM6Ly9naXRodWIuY29tL2NhbXB0b2NhbXAvZG9ja2VyLW1hcHNlcnZlci9ibG9iLzguMC4wL0RvY2tlcmZpbGUjTDg1" class="x_qt-LPBorder753082" style="width:100%; margin-top:16px; margin-bottom:16px; max-width:800px; min-width:424px">
<table id="x_qt-LPContainer753082" role="presentation" style="padding-top:12px; padding-right:36px; padding-bottom:12px; padding-left:12px; width:100%; border-top-width:1px; border-right-width:1px; border-bottom-width:1px; border-left-width:1px; border-top-style:solid; border-right-style:solid; border-bottom-style:solid; border-left-style:solid; border-top-color:rgb(200,200,200); border-right-color:rgb(200,200,200); border-bottom-color:rgb(200,200,200); border-left-color:rgb(200,200,200); border-top-left-radius:2px; border-top-right-radius:2px; border-bottom-right-radius:2px; border-bottom-left-radius:2px">
<tbody>
<tr valign="top" style="border-spacing:0px">
<td>
<div id="x_qt-LPImageContainer753082" style="margin-right:12px; height:120px; overflow-x:hidden; overflow-y:hidden; width:240px">
<a target="_blank" id="x_qt-LPImageAnchor753082" href="https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85"><img id="x_qt-LPThumbnailImageId753082" alt="" height="120" width="240" style="display:block" src="https://opengraph.githubassets.com/89914d21a14748d29e5eb2cb7cf59e720bd216e41863d0bff2ca0e490950eddd/camptocamp/docker-mapserver"></a><br>
</div>
</td>
<td style="width:100%">
<div id="x_qt-LPTitle753082" style="font-size:21px; font-weight:300; margin-right:8px; font-family:wf_segoe-ui_light,"Segoe UI Light","Segoe WP Light","Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; margin-bottom:12px">
<a target="_blank" id="x_qt-LPUrlAnchor753082" href="https://github.com/camptocamp/docker-mapserver/blob/8.0.0/Dockerfile#L85" style="text-decoration-line:none; text-decoration-style:solid; text-decoration-color:currentcolor">docker-mapserver/Dockerfile at
8.0.0 · camptocamp/docker-mapserver</a><br>
</div>
<div id="x_qt-LPDescription753082" style="font-size:14px; max-height:100px; color:rgb(102,102,102); font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif; margin-bottom:12px; margin-right:8px; overflow-x:hidden; overflow-y:hidden">
https://hub.docker.com/r/camptocamp/mapserver/. Contribute to camptocamp/docker-mapserver development by creating an account on GitHub.<br>
</div>
<div id="x_qt-LPMetadata753082" style="font-size:14px; font-weight:400; color:rgb(166,166,166); font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif">
github.com<br>
</div>
</td>
</tr>
</tbody>
</table>
</div>
</div>
<div style="font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_qt-elementToProof" style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div class="x_qt-elementToProof" style="line-height:19px; font-family:Aptos,Aptos_EmbeddedFont,Aptos_MSFontService,Calibri,Helvetica,sans-serif; font-size:12pt; color:rgb(0,0,0)">
<br>
</div>
<div>_______________________________________________<br>
</div>
<div>MapServer-users mailing list<br>
</div>
<div><a href="mailto:MapServer-users@lists.osgeo.org">MapServer-users@lists.osgeo.org</a><br>
</div>
<div><a href="https://lists.osgeo.org/mailman/listinfo/mapserver-users">https://lists.osgeo.org/mailman/listinfo/mapserver-users</a><br>
</div>
<div><br>
</div>
</blockquote>
<div><br>
</div>
</div>
</div>
</body>
</html>