[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-httpd-dev
Subject:    Re: svn commit: r1000593 - in /httpd/httpd/trunk: CHANGES server/util_script.c
From:       Jeff Trawick <trawick () gmail ! com>
Date:       2010-09-25 12:12:43
Message-ID: AANLkTi=m+w69Uf_DD2zyc3LgriVn8+t+Z+d2wznW71Xu () mail ! gmail ! com
[Download RAW message or body]

On Fri, Sep 24, 2010 at 6:30 PM, William A. Rowe Jr. <wrowe@rowe-clan.net>wrote:

> On 9/24/2010 12:09 PM, Jeff Trawick wrote:
> > On Fri, Sep 24, 2010 at 12:50 PM, William A. Rowe Jr. <
> wrowe@rowe-clan.net
> > <mailto:wrowe@rowe-clan.net>> wrote:
> >
> >     On 9/24/2010 11:12 AM, Rainer Jung wrote:
> >     >
> >     > I guess I'm also missing the bigger picture, but:
> >     >
> >     > - at first sight it sounds very reasonable to provide the
> LD_LIBRARY_PATH as well
> >     >
> >     > - it might result in problems, if the binary to start uses system
> libs, which exist in
> >     > LD_LIBRARY_PATH and in system default locations in incompatible
> versions. IMHO this is
> >     > more a theoretical problem. E.g. the apr libs are versioned via the
> soname such that the
> >     > runtime linker won't link against a wrong version.
> >
> >     But these same problems would be true at the shell, prior to invoking
> httpd, no?
> >
> >
> > httpd could pick up library paths from the shell, but it could also pick
> up paths from
> > bin/envvars; the latter is specifically tailored for dependencies
> bundled+built with httpd
> > (and same ABI/debug-ability/etc.); for the slim cases where those defs
> are not irrelevant
> > for the normal CGI/FastCGI, I dunno whether it would be good or bad more
> often
>
> AIUI - apachectl triggers bin/envvars, which injects the appropriate
> LD_LIBRARY_PATH,
> yet this would still not be passed to child processes without my suggested
> commit, right?
>

bin/envvars puts it in the shell used to start httpd, so it works just like
PassEnv


>
> > This could be discussed purely in terms of features we already have:
> >
> > Do admins find 'SetEnv LD_LIBRARY_PATH foo' or 'PassEnv LD_LIBRARY_PATH'
> to solve their
> > problem most often?
> > How often is it problematic to use 'PassEnv LD_LIBRARY_PATH'?
>
> Frequently enough to be a FAQ/documented? (And sometimes not well.)
>
> http://httpd.apache.org/docs/2.2/mod/mod_env.html#passenv
>

I saw that too, but disrespected it as a real world example.  (There's also
the example "UnsetEnv LD_LIBRARY_PATH", which may become more useful now ;)
)


> The original mod_fcgid config docs (cannot find them anymore via google,
> even)
>
> http://httpd.apache.org/docs/2.2/mod/mod_cgi.html (whoops!)
> http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html (whoops!)
>

I guess "whoops" means we don't document it



> http://bugs.php.net/bug.php?id=49173&edit=1
>

looks like poor advice to me


>
> or as encountered 300k+ times in google;
> http://s.apache.org/cOb
>
>
This one yields 181,000 results: >httpd  ld_library_path setenv<
This one yields 3,850: >httpd  ld_library_path passenv<

So many of these are unhelpful though.  E.g., some of those references to
PassEnv say to first modify the script used to start Apache to include
LD_LIBRARY_PATH then code PassEnv in httpd.conf, which seems clumsy.
httpd.conf is the place to consolidate both.

--/--

I guess I'm at the YMMV stage; I think the PassEnv semantics for
LD_LIBRARY_PATH still means that the user ends up configuring the paths in
the shell script used to start httpd or bin/envvars, which seems worse than
just putting SetEnv in httpd.conf.  And automatically passing through the
value required for httpd to run could have occasional negative
consequences.  (But it is unclear to me that it either helps or hurts with
any interesting frequency.)

At any rate, I suggest that you edit the CHANGES to remove the reference to
piped loggers and fix the suggestion that PassEnv is still applicable.  One
possibility:

core: For script invocation, pass the system library path (LD_LIBRARY_PATH
or other
platform-specific variable) by default; PassEnv is no longer necessary for
that.  As before,
use SetEnv to configure a specific value different from that required by
httpd.

[Attachment #3 (text/html)]

<div class="gmail_quote">On Fri, Sep 24, 2010 at 6:30 PM, William A. Rowe Jr. <span \
dir="ltr">&lt;<a href="mailto:wrowe@rowe-clan.net">wrowe@rowe-clan.net</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; \
border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> <div class="im">On \
9/24/2010 12:09 PM, Jeff Trawick wrote:<br> &gt; On Fri, Sep 24, 2010 at 12:50 PM, \
William A. Rowe Jr. &lt;<a \
href="mailto:wrowe@rowe-clan.net">wrowe@rowe-clan.net</a><br> </div><div \
class="im">&gt; &lt;mailto:<a \
href="mailto:wrowe@rowe-clan.net">wrowe@rowe-clan.net</a>&gt;&gt; wrote:<br> &gt;<br>
&gt;     On 9/24/2010 11:12 AM, Rainer Jung wrote:<br>
&gt;     &gt;<br>
&gt;     &gt; I guess I&#39;m also missing the bigger picture, but:<br>
&gt;     &gt;<br>
&gt;     &gt; - at first sight it sounds very reasonable to provide the \
LD_LIBRARY_PATH as well<br> &gt;     &gt;<br>
&gt;     &gt; - it might result in problems, if the binary to start uses system libs, \
which exist in<br> &gt;     &gt; LD_LIBRARY_PATH and in system default locations in \
incompatible versions. IMHO this is<br> &gt;     &gt; more a theoretical problem. \
E.g. the apr libs are versioned via the soname such that the<br> &gt;     &gt; \
runtime linker won&#39;t link against a wrong version.<br> &gt;<br>
&gt;     But these same problems would be true at the shell, prior to invoking httpd, \
no?<br> &gt;<br>
&gt;<br>
&gt; httpd could pick up library paths from the shell, but it could also pick up \
paths from<br> &gt; bin/envvars; the latter is specifically tailored for dependencies \
bundled+built with httpd<br> &gt; (and same ABI/debug-ability/etc.); for the slim \
cases where those defs are not irrelevant<br> &gt; for the normal CGI/FastCGI, I \
dunno whether it would be good or bad more often<br> <br>
</div>AIUI - apachectl triggers bin/envvars, which injects the appropriate \
LD_LIBRARY_PATH,<br> yet this would still not be passed to child processes without my \
suggested commit, right?<br></blockquote><div><br>bin/envvars puts it in the shell \
used to start httpd, so it works just like PassEnv<br> <br></div><blockquote \
class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, \
204, 204); padding-left: 1ex;">

<div class="im"><br>
&gt; This could be discussed purely in terms of features we already have:<br>
&gt;<br>
&gt; Do admins find &#39;SetEnv LD_LIBRARY_PATH foo&#39; or &#39;PassEnv \
LD_LIBRARY_PATH&#39; to solve their<br> &gt; problem most often?<br>
&gt; How often is it problematic to use &#39;PassEnv LD_LIBRARY_PATH&#39;?<br>
<br>
</div>Frequently enough to be a FAQ/documented? (And sometimes not well.)<br>
<br>
<a href="http://httpd.apache.org/docs/2.2/mod/mod_env.html#passenv" \
target="_blank">http://httpd.apache.org/docs/2.2/mod/mod_env.html#passenv</a><br></blockquote><div><br>I \
saw that too, but disrespected it as a real world example.  (There&#39;s also the \
example &quot;UnsetEnv LD_LIBRARY_PATH&quot;, which may become more useful now ;) \
)<br>  <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; \
border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> The original \
mod_fcgid config docs (cannot find them anymore via google, even)<br> <br>
<a href="http://httpd.apache.org/docs/2.2/mod/mod_cgi.html" \
target="_blank">http://httpd.apache.org/docs/2.2/mod/mod_cgi.html</a> (whoops!)<br> \
<a href="http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html" \
target="_blank">http://httpd.apache.org/mod_fcgid/mod/mod_fcgid.html</a> \
(whoops!)<br></blockquote><div><br>I guess &quot;whoops&quot; means we don&#39;t \
document it<br>  <br></div><div> </div><blockquote class="gmail_quote" style="margin: \
0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;"> <a \
href="http://bugs.php.net/bug.php?id=49173&amp;edit=1" \
target="_blank">http://bugs.php.net/bug.php?id=49173&amp;edit=1</a><br></blockquote><div><br>looks \
like poor advice to me<br> <br></div><blockquote class="gmail_quote" style="margin: \
0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<br>
or as encountered 300k+ times in google;<br>
<a href="http://s.apache.org/cOb" target="_blank">http://s.apache.org/cOb</a><br>
<br>
</blockquote></div><br>This one yields 181,000 results: &gt;httpd  ld_library_path \
setenv&lt;<br>This one yields 3,850: &gt;httpd  ld_library_path passenv&lt;<br><br>So \
many of these are unhelpful though.  E.g., some of those references to PassEnv say to \
first modify the script used to start Apache to include LD_LIBRARY_PATH then code \
PassEnv in httpd.conf, which seems clumsy.  httpd.conf is the place to consolidate \
both.<br> <br>--/--<br><br>I guess I&#39;m at the YMMV stage; I think the PassEnv \
semantics for LD_LIBRARY_PATH still means that the user ends up configuring the paths \
in the shell script used to start httpd or bin/envvars, which seems worse than just \
putting SetEnv in httpd.conf.  And automatically passing through the value required \
for httpd to run could have occasional negative consequences.  (But it is unclear to \
me that it either helps or hurts with any interesting frequency.)<br> <br>At any \
rate, I suggest that you edit the CHANGES to remove the reference to piped loggers \
and fix the suggestion that PassEnv is still applicable.  One possibility:<br><br> \
core: For script invocation, pass the system library path (LD_LIBRARY_PATH or \
other<br> platform-specific variable) by default; PassEnv is no longer necessary for \
that.  As before,<br>use SetEnv to configure a specific value different from that \
required by httpd.<br><br>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic