Jump to content
TNG Community

Anyone know where TNG cookies are defined?


JMM

Recommended Posts

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

Link to comment
Share on other sites

Michel KIRSCH

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

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...