Comments (2) Trackbacks (0)
  1. HardCodedNo Gravatar
    5:26 pm on November 12th, 2008

    Shaun I have a unique project I am working on. Don’t worry no graphics involved. Anyway do you know if there is a way to share sessions between a PHP application and a Coldfusion one?

    Maybe share isn’t exactly the word I am looking for. Perhaps a better way would be to create the same sessions both in PHP and Coldfusion. Any ideas?

    The breakdown is that I have a project in which a huge website was built in Coldfusion and now they want to add a PHPBB3 Forum to this site and share the user login information. So basically a person with an existing account should be able to login at the coldfusion app and not have to login a second time when they reach the forums.

    I think that made sense. Thanks!

  2. ShaunNo Gravatar
    2:27 pm on November 21st, 2008

    This can be a bit difficult to accomplish when using various frameworks without exposing yourself to vulnerabilities. There are a couple ways you can do this. You can have an ajax request within the browser start a session on the other site at the same time the user logs in. This is blatantly visible, so for this to be secure, you should probably do a server side post with an ip address after the ajax post to verify the session. Once it’s established, store a cookie for both sites with the login id.

    To overview, the user logs in, if correct, the server performs a post to authenticate the ip address and the signed in username. Then you do a browser ajax request to the second site to create a cookie. When all is said and done, you will have 2 websites, each with a cookie.

    You’ll have to make sure your session/cookie timeout is set the same on both servers and if you provide the user with the ability to log out, you’d need to reverse this process to delete the cookies.

Leave a comment

This site is using OpenAvatar based on

No trackbacks yet.

Olebox - Shaun Oleson is using WP-Gravatar