WordPress.org

Ready to get started?Download WordPress

Forums

Sharing session cookies between installations (6 posts)

  1. Number_6
    Member
    Posted 2 years ago #

    Hi guys,
    I want to be able to merge installations, 3 separate ones.

    Now, when I merge two user tables I get problems with the cookies, they can't work across domains, making it impossible to remain logged in on either installation.

    I don't know how cookies work, but I'm pretty certain the domain is a big part of identification - so if I move the secondary installations to sub-directories on the original and have them display on their original domains, will this get past my problem?

    Is there any other solution to what I seek?

    Cheers

  2. I am not a number, I am a free man.

    *ahem*

    Nope. Cookies can't be shared like that. Cross-domain cookies would be a massive vulnerability. Multisite can share cookies, if the sites are all on one domain, but as soon as you map domains, you have to log in separately, unless you use the NON mapped URL for administration.

  3. Number_6
    Member
    Posted 2 years ago #

    Okay, thanks for the insight.

    I realise there must be something else going wrong as logging into one domain means that you'll be continually logged out of the other. Any clues what might be causing that problem?

  4. How are you merging these installs?

    If you export/import, you'll bring in posts AND users (though users have to reset passwords IIRC).

  5. Number_6
    Member
    Posted 2 years ago #

    Simply by installing them on the same database, and then in the config file redefining the user (and other) tables of the secondary installations as the tables of the first installation.

    It's not something I HAVE to do, but I like to push the envelope and it is a nice idea to have a kind of "MSN Passport" concept.

  6. I can't even figure out WHY you'd want to do that. I would think it's failing since they use the same hashes and salts, and it's butting heads.

    If you want to MERGE sites, you merge 'em via importing.

    If you want them all to be on one database, but separate, you can have separate installs with different prefixes, or use Multisite.

Topic Closed

This topic has been closed to new replies.

About this Topic