<div dir="ltr">I understand your logic and would agree for most things. However, one benefit of the config file is to allow admins to lock things down - especially items like environment variable settings that tell MapServer to load code. Hence my original response, so 1) config file, 2) web server environment, 3) local setting.<div><br></div><div>--Steve</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Jul 6, 2022 at 4:05 PM Jeff McKenna <<a href="mailto:jmckenna@gatewaygeomatics.com">jmckenna@gatewaygeomatics.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Oh don't forget PostGIS' use of that same variable (that's where I hit <br>
this on servers constantly).<br>
<br>
So, my point is, that the only way we can avoid all this "environment" <br>
variable chaos is first always use the local mapfile setting, then look <br>
for .conf, and if neither has this, check the other sources.<br>
<br>
-jeff<br>
<br>
<br>
<br>
On 2022-07-06 6:01 p.m., Jeff McKenna wrote:<br>
> I think we have several possibilities: environment var (system <br>
> variable), web server environment variable (Apache config), MapServer <br>
> .conf, and local mapfile setting.<br>
> <br>
> I would say that the local mapfile should always be used first by <br>
> MapServer, in this order:<br>
> <br>
> - check mapfile setting,<br>
> - if not found, check for MapServer .conf setting,<br>
> - if not found, check for web server setting<br>
> - if not found, check for system environment variable<br>
> - ...else, battle for superiority with the other PROJ_LIB settings by <br>
> the other FOSS4G software on that container<br>
> <br>
> Notes:<br>
> <br>
> - this shared PROJ_LIB issue is not just for MapServer, but is faced by <br>
> all FOSS4G projects that share this variable. On Windows servers now it <br>
> is common for me to have several PROJ_LIB settings, one for each FOSS4G <br>
> software that depends on (depends on that PROJ version for that <br>
> software), such as QGIS, GDAL, MapServer, etc. etc. Meaning: f you need <br>
> a job run for one software, enable that specific PROJ_LIB.<br>
> <br>
> It's fun :)<br>
> <br>
> -jeff<br>
> <br>
> <br>
> <br>
> <br>
> <br>
> On 2022-07-06 5:49 p.m., Steve Lime wrote:<br>
>> This could/would have been the case in past versions as well, right? <br>
>> So I don't think this is a new issue. IMHO I'd think central config <br>
>> settings should trump local settings for something like this.<br>
>><br>
>> On Wed, Jul 6, 2022 at 2:40 PM Seth G <<a href="mailto:sethg@geographika.co.uk" target="_blank">sethg@geographika.co.uk</a> <br>
>> <mailto:<a href="mailto:sethg@geographika.co.uk" target="_blank">sethg@geographika.co.uk</a>>> wrote:<br>
>><br>
>> Hi all,<br>
>><br>
>> Using MapServer 8.0 beta and FastCGI (on Windows) I'm running into<br>
>> an issue where the PROJ_LIB setting is sometimes set by the value in<br>
>> the CONFIG file and sometimes by the setting in the Mapfile:<br>
>><br>
>> CONFIG<br>
>> ENV<br>
>> MS_MAP_PATTERN "."<br>
>> PROJ_LIB "C:/MapServer/bin/proj7/share" #proj7<br>
>> END<br>
>> END<br>
>><br>
>> Then in a Mapfile:<br>
>><br>
>> CONFIG "PROJ_LIB" "C:/MapServer/bin/proj/SHARE" # uses proj6<br>
>><br>
>> Requests will use one PROJ setting then switch to another seemingly<br>
>> at random.<br>
>> Should one always take precedence over the other?<br>
>><br>
>> Seth<br>
>><br>
>> --<br>
>> web:<a href="https://geographika.net" rel="noreferrer" target="_blank">https://geographika.net</a> <<a href="https://geographika.net" rel="noreferrer" target="_blank">https://geographika.net</a>><br>
>> twitter: @geographika<br>
> <br>
<br>
-- <br>
Jeff McKenna<br>
GatewayGeo: Developers of MS4W, MapServer Consulting and Training<br>
co-founder of FOSS4G<br>
<a href="http://gatewaygeo.com/" rel="noreferrer" target="_blank">http://gatewaygeo.com/</a><br>
<br>
_______________________________________________<br>
MapServer-dev mailing list<br>
<a href="mailto:MapServer-dev@lists.osgeo.org" target="_blank">MapServer-dev@lists.osgeo.org</a><br>
<a href="https://lists.osgeo.org/mailman/listinfo/mapserver-dev" rel="noreferrer" target="_blank">https://lists.osgeo.org/mailman/listinfo/mapserver-dev</a><br>
</blockquote></div>