httpd-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 36919] - DocumentRoot must be absolute path or apache silently fails
Date Sun, 30 Oct 2005 23:39:09 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=36919>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=36919





------- Additional Comments From aalvaradoh@gmail.com  2005-10-31 00:39 -------
(In reply to comment #1)
> DocumentRoot is already ServerRoot-relative, so I'm not sure exactly what
> problem you are seeing, probably something else.

Very simple, in httpd-2.0.55.tar.gz tarball source file httpd-2.0.55/server/
core.c, has this version of function "set_document_root":

> static const char *set_document_root(cmd_parms *cmd, void *dummy,
>                                      const char *arg)
> {
>     void *sconf = cmd->server->module_config;
>     core_server_config *conf = ap_get_module_config(sconf, &core_module);
> 
>     const char *err = ap_check_cmd_context(cmd,
>                                            NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
>     if (err != NULL) {
>         return err;
>     }
> 
>     /* TODO: ap_configtestonly && ap_docrootcheck && */
>     /* XXX Shouldn't this be relative to ServerRoot ??? */
>     if (apr_filepath_merge((char**)&conf->ap_document_root, NULL, arg,
>                            APR_FILEPATH_TRUENAME, cmd->pool) != APR_SUCCESS
>         || !ap_is_directory(cmd->pool, arg)) {
>         if (cmd->server->is_virtual) {
>             ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0,
>                           cmd->pool,
>                           "Warning: DocumentRoot [%s] does not exist",
>                           arg);
>             conf->ap_document_root = arg;
>         }
>         else {
>             return "DocumentRoot must be a directory";
>         }
>     }
>     return NULL;
> }

while http://svn.apache.org/repos/asf/httpd/httpd/trunk/server/core.c, has this:

> static const char *set_document_root(cmd_parms *cmd, void *dummy,
>                                      const char *arg)
> {
>     void *sconf = cmd->server->module_config;
>     core_server_config *conf = ap_get_module_config(sconf, &core_module);
> 
>     const char *err = ap_check_cmd_context(cmd,
>                                            NOT_IN_DIR_LOC_FILE|NOT_IN_LIMIT);
>     if (err != NULL) {
>         return err;
>     }
> 
>     /* Make it absolute, relative to ServerRoot */
>     arg = ap_server_root_relative(cmd->pool, arg);
> 
>     /* TODO: ap_configtestonly && ap_docrootcheck && */
>     if (apr_filepath_merge((char**)&conf->ap_document_root, NULL, arg,
>                            APR_FILEPATH_TRUENAME, cmd->pool) != APR_SUCCESS
>         || !ap_is_directory(cmd->pool, arg)) {
>         if (cmd->server->is_virtual) {
>             ap_log_perror(APLOG_MARK, APLOG_STARTUP, 0,
>                           cmd->pool,
>                           "Warning: DocumentRoot [%s] does not exist",
>                           arg);
>             conf->ap_document_root = arg;
>         }
>         else {
>             return "DocumentRoot must be a directory";
>         }
>     }
>     return NULL;
> }


So, tarball has a bug.


-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: bugs-unsubscribe@httpd.apache.org
For additional commands, e-mail: bugs-help@httpd.apache.org


Mime
View raw message