I am thinking about setting up two installations of 4images that would share users. I have very carefully searched the forum, and although there are similar threads I couldn't find the answer to my dilemma. I was hoping someone would be able to think with and tell me if I am correct or wrong, or whether I am trying to do something that may potentially damage my data.
These are the requirements:
1. Installation 2 would use the users of installation 1
2. All other data (images, categories, comments, captions, etc.) would be separate
I have been playing around to figure out how to do this.
In installation 2, I changed "includes/constants.php" as follows:
from
define('USERS_TABLE', $table_prefix.'users');
to
define('USERS_TABLE', 'installation1_users');
This worked fine. The users were now available in installation 2.
However, when I log in at installation 1, I am still not logged in at installation 2 and visa versa.
This is of course because of the cookie settings in includes/sessions.php. I figure I must change sessions.php of installation 2. I tried several combinations, but couldn't figure it out.
If my setup for installation 1 is domain.com/photos and for installation 2 is domain.com/photos2, how should I change the following in sessions.php of installation 2?
define('COOKIE_PATH', '');
My questions in summary:
1. What do I put in COOKIE_PATH?
2. Is there anything else that I would need to change?
3. Is there any danger that data may get damaged, or that the program won't work when two installations share users and 1 cookie?
I am sure that many other users would benefit from this modification as well, so I hope there will be some good input.