Summary: | Warning : Config variable ${myvar} is not defined | ||
---|---|---|---|
Product: | Apache httpd-2 | Reporter: | Ben RUBSON <ben.rubson> |
Component: | Core | Assignee: | Apache HTTPD Bugs Mailing List <bugs> |
Status: | NEW --- | ||
Severity: | normal | CC: | szg0000 |
Priority: | P2 | Keywords: | PatchAvailable |
Version: | 2.4-HEAD | ||
Target Milestone: | --- | ||
Hardware: | PC | ||
OS: | Linux |
Description
Ben RUBSON
2016-04-24 15:22:12 UTC
sorry, you will have corrected, here are the warnings : [Sun Apr 24 17:20:43.834413 2016] [core:warn] [pid 88431] AH00111: Config variable ${myvar} is not defined Syntax OK Starting apache24. [Sun Apr 24 17:20:43.896887 2016] [core:warn] [pid 88432] AH00111: Config variable ${myvar} is not defined Any way you can set your var with any other set of directives, like <if> and setenvif? I think if you chose a var-name with a ":" character embedded in it, it would allow you to suppress those warnings. A real fix is still obviously needed for this conflict and others. Unfortunately, my var value comes from a RewriteMap, so I can't use a different directive to set it. I tested some workarounds to switch this warning off. First one, but does not work, warning still present : SetEnvIfExpr "'a' == 'b'" myvar Second one, warning still present : SetEnv myvar I also tested addng this in envvars.env file : export myvar= Warning went away, but then, the RewriteRule does not overwrite the variable. I would like to test your variable name workaround, but how do you define a variable name with a embedded ":" in the following rule ? (as ":" is the separator between the variable name and its value) RewriteRule .* - [E=myvar:127.0.0.1:5000] Thank you Eric ! Eric, Any clue regarding your variable name workaround ? :) Many thanks ! Patch just committed ! https://github.com/apache/httpd/pull/28 Solved by not hard-fixing empty environment variables. In the above example, simply setting the following env var : myvar= will avoid the warning message. ${myvar} will then be kept like this, an populated by the RewriteRule. Thank you ! |