Running two mantis pages on the same site -- cannot stay logged in

General discussion of Mantis.

Moderators: Developer, Contributor

Post Reply
soar244
Posts: 2
Joined: 03 Jun 2025, 05:36

Running two mantis pages on the same site -- cannot stay logged in

Post by soar244 »

I am running MantisBT 2.27.1 with PHP version 8.1. I am a long time user of Mantis, going back ~19 yrs. I recently upgraded from 1.2.5 to 2.27.1 and ran into a new problem.

My two mantis pages run on the same domain, e.g., say:

https://www.mydomain.com/mantis_1

https://www.mydomain.com/mantis_2

These are running off of a hosted CPanel server and all works. These also worked properly with 1.2.5 and PHP 5.6.

My problem now with 2.27.1 is that when I log into one and do work (say, _1), then when I go to the other one (_2), I find that it logs me out when I click on anything. I can then log in and do work (_2), but then when I go back to the first (_1), it logs me out when I click on anything. So I have to log in again. Rinse and repeat ...

This means that I cannot stay logged into both in separate tabs in the same browser (Brave). The problem persists if I run both links using 'incognito' mode.

I also have the same two 2.27.1 mantis pages running locally on my PC with docker, each with unique addresses, e.g. localhost:8081 and localhost:8082. Those sessions will let me stay logged in, unlike the live hosted site.

What can I do to break this can-only-stay-logged-into-one-page behavior?

Thanks.
atrol
Site Admin
Posts: 8531
Joined: 26 Mar 2008, 21:37
Location: Germany

Re: Running two mantis pages on the same site -- cannot stay logged in

Post by atrol »

Didn't try, changing $g_cookie_prefix for one of the pages should help.
https://mantisbt.org/docs/master/en-US/ ... ig.cookies
Please use Search before posting and read the Manual
soar244
Posts: 2
Joined: 03 Jun 2025, 05:36

Re: Running two mantis pages on the same site -- cannot stay logged in

Post by soar244 »

Thank you! That fixed it.
Post Reply