2 Gallerys on the same web-space [SOLVED]

dgparryuk

Joined: 2010-06-27
Posts: 3
Posted: Mon, 2010-12-06 12:02

Well, this is a minor annoyance more than anything...

i have 2 galleries running for different things, on the same web-space... i just want to keep them totally seperate from each other...

one runs in "www.url.co.uk/gallery" and the other runs in "www.url.co.uk/blog/gallery"
however if i want to swap from one to the other in admin mode, i have to re-log in, and it logs the other one out...
guessing it's over-writing a cookie somewhere... - i also thought that the REST API set the same for both - but can't see where i can set it rather than just a re-set...

any one any ideas on how to keep logged into both?
I did try the wordpress plug in but it couldn't find the admin user...

 
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 16504
Posted: Mon, 2010-12-06 20:13
Quote:
however if i want to swap from one to the other in admin mode, i have to re-log in, and it logs the other one out...

Yep, if you don't want that then put them on different domains and not just a sub-directory.

gallery.example.co.uk

blog.example.co.uk/gallery

or something like that.

or run 2 different browsers. Chrome for one gallery and Firefox for the other...
____________________________________________
Like Gallery? Like the support? Donate now!

 
dgparryuk

Joined: 2010-06-27
Posts: 3
Posted: Mon, 2010-12-06 20:50

Yeah, had a feeling it might be like that - but thought i'd ask..
it's only a minor pain for me :-) and i can't see many people doing the same so...
really loving the gallery overall... well i run it on 9 different sites.. :-)

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Wed, 2010-12-15 00:57

That's happening because we're not restricting the cookie path. Try editing modules/gallery/config/cookie.php and look for

/**
 * Restrict cookies to a specific path, typically the installation directory.
 */
$config['path'] = '/';

Set the path to the right specific path for each install. So one should have "/gallery" and the other should have "/blog/gallery"
---
Problems? Check gallery3/var/logs
bugs/feature req's | upgrade to the latest code | use git

 
dgparryuk

Joined: 2010-06-27
Posts: 3
Posted: Wed, 2010-12-15 11:55

and that worked - :-)

Cheers