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 5 of 5
  1. #1
    New Coder
    Join Date
    Jul 2002
    Location
    Glasgow, Scotland
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts

    PHP sessions not working with IE6

    I am using:

    session_start();
    session_register('login');
    session_register('password');

    at the top of my first page after login on my site. After this I use session_start(); at the top of every page and then check on every page that the current session variables $login and $password are paired up in my database to validate my users.

    This seems to work fine in IE5.5 and below but in IE6 with it's extra security settings, my users are told they are not logged in. This can be fixed this manually by going into the Tools/Internet options menu and adding my site the the "allow" sites. However, I would like to know if there is a way I could get my site to work ok without requiring my users to go through this annoying procedure.

    Thanks,

    Martin

  • #2
    Supreme Overlord Spookster's Avatar
    Join Date
    May 2002
    Location
    Marion, IA USA
    Posts
    6,278
    Thanks
    4
    Thanked 83 Times in 82 Posts
    Sessions use cookies either stored on the client or on the server. Client side session cookies in IE6 fall under the Privacy section so if you are not allowing client side session cookies to be stored (which they are by default) then that will be why your session is not working.
    Spookster
    CodingForums Supreme Overlord
    All Hail Spookster

  • #3
    New Coder
    Join Date
    Jul 2002
    Location
    Glasgow, Scotland
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Thanks, that makes sense as it said something about cookies and I didnt think I was using them. Does anyone know of any easy way to get round this so my users dont have to edit their internet options?

  • #4
    New Coder
    Join Date
    Jul 2002
    Location
    Glasgow, Scotland
    Posts
    27
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I found this article on the topic I am having problems with http://www.oreillynet.com/pub/wlg/1539. However, I am usure exactly what I can do to solve the problem from this. Could anyone put it in simple terms for me? It says I should send

    header('P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"');

    What exactly does this mean? Should I included this code at the top of my page?

    Any ideas?

  • #5
    Regular Coder Feyd's Avatar
    Join Date
    May 2002
    Location
    Los Angeles, CA Maxim: Subvert Society
    Posts
    403
    Thanks
    0
    Thanked 0 Times in 0 Posts
    You should create a valid P3P privacy policy, by default, since this is going to be the defacto privacy platform for a time to come.

    That code should help you get around the problem, you'd need to include it on every page, before page information is sent (this is a header, remember) or you can include it globally depending on your access to your site configurations. To really make yourself the best and eliminate this problem, however, you are going to need to have a true valid p3p privacy policy (though that code should also work for you).
    Moderator, Perl/CGI Forum
    shadowstorm.net - subvert society


  •  

    Posting Permissions

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