4images Issues / Ausgaben > Installation, Update & Configuration

install 2 galleries

(1/4) > >>

airliner:
Hi folks,

It it possible to install two galleries in the same database with different table prefixes and let them share login sessions ???
Is it hard to modify ??
I'm a bit of a newbie guys .. but I gues that constant, session.php has to be modified pretty much?

Thanx

V@no:
assuming database prefix for you first 4images is 4images1 and for your second 4images is 4images2, then you can try replace in your second 4images includes/constants.php
define('SESSIONS_TABLE', $table_prefix.'sessions');
define('SESSIONVARS_TABLE', $table_prefix.'sessionvars');
define('USERS_TABLE', $table_prefix.'users');

with:
define('SESSIONS_TABLE', '4images1_sessions');
define('SESSIONVARS_TABLE', '4images1_sessionvars');
define('USERS_TABLE', '4images1_users');


In includes/sessions.php find:
define('COOKIE_PATH', '');

Replace with:
define('COOKIE_PATH', '/path/to/first/4images/');


i.e. if your first 4images located at http://yourdomain.com/blah/4images1/, then the line would be:
define('COOKIE_PATH', '/blah/4images1/');


not sure if it's going to work though
[EDIT]
just tested it, works fine, but you'll need add into config.php of each gallery:
define('SESSION_KEY', "this is a random string, must be identical in each gallery");

[/EDIT]

airliner:
Thanx ... worked fine ..
I missed the session key part :)

Thank you very much Sir.

V@no:
I just discovered, that auto login will not work in second 4images. One more change needed in second 4images to fix that. (added to the instructions above)

airliner:
Fantastic Sir! :)

Navigation

[0] Message Index

[#] Next page

Go to full version