Feature #5054

Session cookie name prevents multiple login to 2 installations of chamilo

Added by Jan Derriks over 7 years ago. Updated almost 4 years ago.

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


Estimated time:
0.50 h
SCRUM pts - complexity:


The CH_SID cookie is used for sessions but is the same for every install.
The effect is that if you have multiple installations of chamilo on the same server, you cannot be logged into both at the same time. Suppose has a test1 end test2 version of chamilo1.8, then When you switch from to, you will have to logon again. And vice versa.

The problem is caused by:
main_api.lib.php: session_name('ch_sid');

And can be solved by changing ch_sid into a different name for every installation of chamilo. You can choose any name fod ch_sid.

Maybe that "store sessions in database" is another solution but I don't know for sure.

Related issues

Related to Chamilo LMS - Bug #3854: Session is inherited between browser tabsNew31/08/2011

Related to Chamilo LMS - Feature #3996: Permit setting the PHP session expiry timeNew21/10/2011




Updated by Yannick Warnier over 7 years ago

  • Target version set to 1.9.2
  • Estimated time set to 0.50 h

Hi Jans,

This is a very specific problem. I will move it to 1.9.2 because it doesn't prevent most people to use it (I would broadly estimate the users affected to 1/100,000 because they need to have accounts on two different portals and use chamilo installations as subdirectories - we recommend using subdomains).
Subdomains work fine in this situation. In order to implement a fix to this, we would have to change the set_cookie() function to set it to a particular directory. I don't remember exactly what it is.


Updated by Laurent Opprecht over 7 years ago

could go on the line of

$root_path = ...;
cookie_name = '_chamilolml_' . md5($root_path);


Updated by Yannick Warnier over 7 years ago

  • Tracker changed from Bug to Feature

Updated by Yannick Warnier over 7 years ago

  • Target version changed from 1.9.2 to 1.9.4

Updated by Julio Montoya about 7 years ago

  • Target version changed from 1.9.4 to 2.0

Moving to 1.10


Updated by Yannick Warnier almost 4 years ago

  • Target version changed from 2.0 to 3.0

Also available in: Atom PDF