Feature #6104

Remove root_sys from configuration.php

Added by Yannick Warnier about 8 years ago. Updated over 5 years ago.

Bug resolved
Target version:
Start date:
Due date:
% Done:


Estimated time:
Spent time:
SCRUM pts - complexity:


I don't think the $_configuration['root_sys'] is really necessary in configuration.php anymore.
We can now get it by checking the DIR (available since PHP 5.3.0) in

I'm trying to figure out why it was used in the first place, and the only things that come to mind are:
  • there was no dirname() in PHP 3, and maybe Claroline started with v3? (although PHP4 appeared in May 2000, which is before Claroline started, maybe there was some considerable delay before it was adopted)
  • there was no FILE in PHP < 4.0.2 (see
  • there might be a problem with dirname(FILE) with symbolic links and the fact that we would require (from to do: $_configuration['root_sys'] = DIR.'/../../'; (and sometimes ".." is not translated well in symbolic links contexts.

Either way, we could just make $_configuration['root_sys'] optional in configuration.php, by leaving a commented line and adding some information for this inside the same file and inside the installation guide.

The rationale behind removing/commenting this setting is:
  • it blocks the possibility to move the chamilo directory (it just fails unless you change the setting)
  • we don't really need it anymore (let's build an easier configuration file)


Related issues

Related to Chamilo LMS - Bug #6116: Remove $_configuration['system_stable'], $_configuration['software_name'], $_configuration['software_url'] settings in configuration.phpNew24/04/2013

Related to Chamilo LMS - Feature #5906: Remove $_configuration['db_admin_path'] and $_configuration['code_append']New25/01/2013


Associated revisions

Revision 0d464060 (diff)
Added by Julio Montoya about 8 years ago

Replacing $_configuration['root_sys'] with api_get_path(SYS_PATH) see #6104

Revision 4f503297 (diff)
Added by Julio Montoya about 8 years ago

Replacing root_sys with api_get_path(SYS_PATH), setting sys path in global inc instead of api_get_path() changing some other paths due the new "data" folder see #6104

Revision 96a244b1 (diff)
Added by Julio Montoya about 8 years ago

More changes in the configuration.file see #6104



Updated by Julio Montoya about 8 years ago

  • Assignee changed from Julio Montoya to Yannick Warnier

I agree, the first step should be to replace all calls of "$_configuration['root_sys']" with "api_get_path(SYS_PATH)".
I think we could just remove the $_configuration['root_sys'] from everywhere.


Updated by Julio Montoya about 8 years ago

  • Status changed from Needs more info to Assigned
  • Assignee changed from Yannick Warnier to Julio Montoya

Taking this task to replace all $_configuration['root_sys'] with api_get_path(SYS_PATH)


Updated by Julio Montoya over 5 years ago

  • Status changed from Assigned to Bug resolved

we use now parameters.yml the "root_sys" can be found using this in a controller:


Also available in: Atom PDF