View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0021584 | mantisbt | customization | public | 2016-08-02 14:15 | 2021-06-21 16:48 |
Reporter | atrol | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | have not tried |
Status | new | Resolution | open | ||
Summary | 0021584: core_path directory can't be moved outside the web root | ||||
Description | After a fresh install running admin/check.php gives WARN for check: Moving the directory outside the web root does not work as there is a hardcoded path in core.php constant_inc.php has been moved to core folder in 2003, see commit 5cad7a7e23fba2a51a369a764daf33aeee232ddd | ||||
Tags | No tags attached. | ||||
This problem occurs because when core.php is loaded the config file has not been read yet. So if you set $g_core_path in /config/config_inc.php the variable is still not defined at that moment. A work around is to move the whole core directory to an outside path. Then recreate the core folder and copy the file constant_inc.php to that newly created core folder from the outside path core folder. This will result in an empty core folder that only contains constant_inc.php. You can also move the config folder to the outside location. And then you have to still keep the config folder and /config/config_inc.php. But you can edit that new config and change its content to only the paths and the include_once( $g_config_path . 'config_inc.php' ). Here is the snippet: include_once( $g_config_path . 'config_inc.php' ); Hope this helps anybody who had the same problem. |
|
I tried this with 2.11.1 but when I tried to go to the login page, I get a blank. only when I put the config back in the mantisbt root directory does this work. This also happens when i move the core as well. Please advise as to what I could be doing wrong. |
|
Note the variable $ t_local_config = getenv ('MANTIS_CONFIG_FOLDER') in config_defaults_inc.php It extracts the path to your "config" folder from the environment variable of your web server. |
|
Indeed, there is a problem. Sorry... |
|
still there in 2.24.1 |
|
Even if one updates the variables to point to the outside, apparently path to "core" folder is hardcoded at https://github.com/mantisbt/mantisbt/blob/master/core.php#L67, so it makes no sense to copy core folder outside of webroot. Update: found several more hardcoded paths:
=> so those checks don't make any sense now, there is no way to fix them. Please remove them until it's possible to make them green without dirty hacks. |
|
I've just run into this too updating to 2.24.1. (Also I don't recall this warning in previous versions.) |
|
Just as a datapoint: I installed a fresh 2.25.2 on a fresh server and saw this again. |
|