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 6 of 6
  1. #1
    Regular Coder
    Join Date
    Jul 2003
    Posts
    262
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Session problem on this site, need some help please.

    I'm no php guru but I've worked with sessions before and have not run into this. Reading the manual didn't provide any clues either.

    Problem: When sessions are in use some pages will not load. It is somewhat random, 6/10 attempts the page may not load. This appears to be limited to the IE browser. Removing session_start results in the problem going away 100%.

    Code: Only the php is posted below, you can see the page source by viewing it from your browser if you like. This is the only php in the page, the rest is just html.
    <?php
    session_start();
    ?>

    Reproduce It:This is the general site link (it's a work in progress): www.nvreefers.org, on the menu click on the "Links" link while using IE. If the page loaded go back and repeat. Usually in the first few tries the "Links" page will fail to load, you'll end up with a blank page. I've left session_start in the "Links" page to demonstrate the problem.

    If anyone knows what the issue could be please help me out! This has been driving me nuts. I use MOZ and didn't even realize the problem until someone pointed it out), so for now all sessions are disabled on the site which is a big problem.

  • #2
    Regular Coder
    Join Date
    Dec 2002
    Location
    a bit west of pittsburgh
    Posts
    236
    Thanks
    1
    Thanked 0 Times in 0 Posts
    shot in the dark here, but try a session_write_close() at the end of your script.

  • #3
    Regular Coder
    Join Date
    Jul 2003
    Posts
    262
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks for the suggestion but it didn't help.

    One more piece of information - When the page fails to load the URL in IE still displays the URL of the page you were navigating from, not the URL of the "Links" page. I'm not sure what to make of this either. Could it be something to do with the way php write the session id to the hyperlinks? Are there any settings that can be tweaked in that regard?

  • #4
    Regular Coder
    Join Date
    Jul 2003
    Posts
    262
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Just for the hell of it I added:
    header("Cache-control: private");


    Everything appears to be working now. I should have tried this right away but I wasn't posting anything via forms on most of the pages so I figured it wouldn't help. If anyone can verify the "Links" page appears to be loading correctly on IE I'd appreciate the feedback

  • #5
    Regular Coder
    Join Date
    Feb 2005
    Location
    West Midlands, UK
    Posts
    623
    Thanks
    0
    Thanked 0 Times in 0 Posts
    The links page seemed to work fine for me, but your homepage was blank the first time it loaded, I had to refresh it to see it.

  • #6
    Regular Coder
    Join Date
    Jul 2003
    Posts
    262
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thanks, I was just changing the code there to test also. The same problem cropped up, and the fix seemed to work there also, so I think everything is good. I really do hate MS... always a PITA to deal with their garbage.


  •  

    Posting Permissions

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