Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    New to the CF scene
    Join Date
    Jun 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Strange problem with frames and login script

    One of my customers has a domain redirected with frame masking to a page in my server (so you always see www.domain.com instead of www.otherdomain.com/Username/index.htm)

    The problem is that there is a page wich has restricted access using a simple php login script. Everything worked fine until, some days ago, I moved to a new server that seems to have a newer version of php. Now the login page works fine, as always, but it doesn't retain the session info anymore, so you always end again in the login page.

    However, if I load the login page outside frames (i.e. I open www.otherdomain.com/Username/login.php) everything works ok... and if then, after logged in this way, I go to the framed page and navigate to the login page... it works!

    Somebody knows how can I solve this problem?

  • #2
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    Is is possible that the new host is using URL re-writing for storing session info instead of cookies, when it was using cookies before?

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/

  • #3
    New to the CF scene
    Join Date
    Jun 2005
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by nikkiH
    Is is possible that the new host is using URL re-writing for storing session info instead of cookies, when it was using cookies before?
    I don't think so... I seem to have find a solution, however, adding the session identifier variable (SID) in every link & form it works fine. I wonder if this can be done automatically

  • #4
    Senior Coder nikkiH's Avatar
    Join Date
    Jun 2005
    Location
    Near Chicago, IL, USA
    Posts
    1,973
    Thanks
    1
    Thanked 32 Times in 31 Posts
    That would be session URL re-writing.
    Can be configured in the web server.

    Session IDs are either stored as a cookie or passed via the URL. Looks like you're having a cookie domain issue, possibly due to the frames. Set the server to use URL re-writing or see if you can fix the domain issue.
    Probably easier to set the server than to troubleshoot the cookies.

    If this post contains any code, I may or may not have tested it. It's probably just example code, so no getting knickers in a bunch over a typo, OK? If it doesn't have basic error checking in it, such as object detection or checking if objects are null before using them, put that in there. I'm giving examples, not typing up your whole app for you. You run code at your own risk.
    Bored? Visit
    http://www.kaelisspace.com/


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •