https://redmine.lighttpd.net/https://redmine.lighttpd.net/favicon.ico?13667327412010-05-31T20:59:54Zlighty labsLighttpd - Bug #2216: mod_userdir doesn't set environment variable DOCUMENT_ROOThttps://redmine.lighttpd.net/issues/2216?journal_id=69872010-05-31T20:59:54ZDanielRichman
<ul></ul><p>That's meant to say <br /><pre>
2) in a test php file '<?php phpinfo(); ?>'
</pre><br />but appears to have got cut out... along with some other stuff</p> Lighttpd - Bug #2216: mod_userdir doesn't set environment variable DOCUMENT_ROOThttps://redmine.lighttpd.net/issues/2216?journal_id=70652010-07-04T10:40:29Zstbuehler
<ul></ul><p>mod_alias doesn't modify the doc_root either, so i'm not sure whether we really want that in mod_userdir.</p> Lighttpd - Bug #2216: mod_userdir doesn't set environment variable DOCUMENT_ROOThttps://redmine.lighttpd.net/issues/2216?journal_id=71702010-08-07T13:43:15Zstbuehler
<ul><li><strong>Status</strong> changed from <i>Patch Pending</i> to <i>Invalid</i></li><li><strong>Target version</strong> deleted (<del><i>1.4.x</i></del>)</li><li><strong>Missing in 1.5.x</strong> changed from <i>Yes</i> to <i>No</i></li></ul><p>As long as no one provides good reasons why we would want to change that, i don't change it :)</p> Lighttpd - Bug #2216: mod_userdir doesn't set environment variable DOCUMENT_ROOThttps://redmine.lighttpd.net/issues/2216?journal_id=71762010-08-07T17:46:18ZDanielRichman
<ul></ul><pre>
This feature might be useful for additional security when using suphp
with lighttpd http://www.suphp.org/DocumentationView.html?file=CONFIG
see check_vhost_docroot:
Checks wheter the script is within DOCUMENT_ROOT specified by the
webserver. This option is intended to avoid symbol links outside of the
webpage directory. You may want to disable it, when you are using
mod_vhost_alias or the Alias-directive.
(trying to do this was how I noticed this issue)
I am yet to meet some CGI/php that relies on the DOCUMENT_ROOT env. var,
but it is possible.
</pre> Lighttpd - Bug #2216: mod_userdir doesn't set environment variable DOCUMENT_ROOThttps://redmine.lighttpd.net/issues/2216?journal_id=72262010-09-05T18:08:53Zstbuehler
<ul><li><strong>Status</strong> changed from <i>Invalid</i> to <i>Reopened</i></li><li><strong>Target version</strong> set to <i>1.4.29</i></li></ul><p><a class="external" href="http://www.php.net/manual/en/configuration.file.per-user.php">http://www.php.net/manual/en/configuration.file.per-user.php</a></p>
<p>It scans the directories up to the doc-root, if the doc-root is a prefix of the "script-filename"; otherwise it only scans the directory of the "script-filename".</p>
<p>So we probably want to set the userdir / alias destination as doc-root.</p> Lighttpd - Bug #2216: mod_userdir doesn't set environment variable DOCUMENT_ROOThttps://redmine.lighttpd.net/issues/2216?journal_id=75182011-06-13T14:25:06Zstbuehler
<ul><li><strong>Status</strong> changed from <i>Reopened</i> to <i>Fixed</i></li></ul><p>Applied in changeset r2794.</p> Lighttpd - Bug #2216: mod_userdir doesn't set environment variable DOCUMENT_ROOThttps://redmine.lighttpd.net/issues/2216?journal_id=83472014-03-27T09:16:03Zglen
<ul></ul><p>i think it's wrong to change DOCUMENT_ROOT to be root of alias, it's breaking the common setup that has always existed, since even PHP was invented.</p>
<p>for example this kind PHP specific hack breaks the possibility to access real document root (set in virtualhost config) if your script itself is mapped to all virtualhosts via Alias.</p>
<p>if such option is still wanted (note that bug reporter himself wasn't sure but you still merged it!), it should be configurable option, either global or new directive to map such alias which also changes DOCUMENT_ROOT.</p>
<p>there's also mailinglist post saying that this change is wrong: <a class="external" href="http://article.gmane.org/gmane.comp.web.lighttpd/5361">http://article.gmane.org/gmane.comp.web.lighttpd/5361</a></p>