JMM Posted February 28, 2023 Report Share Posted February 28, 2023 Hello, folks, I am having an issue which I am not sure but I think might be related to cookies used by TNG. I have a TNG test site located at https://testing.genealogywings.me/tng02 , to test TNG 14.0.1 before upgrading my live TNG site from TNG 14.0 Because of mod issues, I created another TNG test site at https://testing.genealogywings.me/tng04 Everything works great, and I can log into both TNG sites fine. However, when I am logged into one of those 2 TNG test sites, and then I log into the other TNG test site on that same domain, I am automatically logged out of the previous TNG test site. Example: if I am logged into the /tng2 site, and then I log into the /tng4 site, I am automatically logged out of the /tng2 site. About a week or so ago, I was viewing phpinfo using admin_phpinfo.php, and I noticed various TNG cookies, one of them named tngloggedin, and I'm wondering if this is what is causing my problem of being logged out of one of my TNG test sites on a domain when I log into another TNG test site on that same domain. Does anyone know where in TNG (be it in a file or in an MySQL location) the TNG cookie names are defined? I am hoping that I can manually change the cookie prefixes for each of my TNG test sites that are on the same domain, for example to tngtest02xxxxx and tngtest04xxxxx, so that the logged in cookies would end up being tngtest02loggedin and tngtest04loggedin, etc. I ran into this exact same cookie problem many years (decade?) ago, when I initially tried to setup a test TNG installation on the same domain that my live TNG site is on, and since then ended up with 2 additional (separate) domains just for TNG testing purposes so that they do not conflict with each other. It would be nice to have my live & test TNG installs on the same (single) domain, to save the additional costs of having separate domains for TNG testing. Thank you in advance & have yourselves a great day. Regards, John Quote Link to comment Share on other sites More sharing options...
Michel KIRSCH Posted March 6, 2023 Report Share Posted March 6, 2023 Hi John, I solve this problem with using 2 different admin names : one for each site. For where the cookies are stored,, Darrin doesn't monitor the forum. So it is better to ask the question on the tngusers2 list. Michel Quote Link to comment Share on other sites More sharing options...
JMM Posted March 6, 2023 Author Report Share Posted March 6, 2023 Hi, Michel, thanks for your reply. Actually, with all my sites, each one has a different (unique) TNG username & password, but this problem is still. happening. Under PHP Variables, when I am logged into a TNG site & then try to log into another TNG site on the same domain, I see both their login cookies, as an example: $ _ COOKIE ['tngloggedin_D:Web~TNGhost~GenealogyWingsme-TestingTNG-TestSite02-v1401'] = 1 $ _ COOKIE ['tngloggedin_D:Web~TNGhost~GenealogyWingsme-TestingTNG-TestSite-T00-v1401'] = 1 For the occasional times that I have needed to be logged into more than one test site on the same domain, for example to view or copy TNG settings between those sites, my simple work-around has been to just use a different browser on each of those sites. It would've been nice to use the same browser, as my password manager is linked to only one of my browsers, but as I only need to do so occasionally, using different browsers work for me. I just thought I would ask anyway, in case there was a simple cause & fix . Thank again for your reply. Regards, John Quote Link to comment Share on other sites More sharing options...
Katryne Posted March 7, 2023 Report Share Posted March 7, 2023 I too use different browsers for testing, because of this sticky cookies causing logout on the other site when using 2 sub-domains of the same domain. I would like to find a solution. It looks like (I'm not sure) the cookie is connected to the main domain, each time. Quote Link to comment Share on other sites More sharing options...
MartinH Posted March 17, 2023 Report Share Posted March 17, 2023 I get around this by opening the second site in an incognito tab. Quote Link to comment Share on other sites More sharing options...
Katryne Posted March 17, 2023 Report Share Posted March 17, 2023 Hi Martin, thanks for the tip. I had not thought of it. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.