At a loss for an odd loop error

Discussion in 'PHP' started by mbg_oioi, Sep 19, 2012.

  1. #1
    We use PHP so i'm posting here, I don't know if this would be better off in the server admin forum.. anyhow, new here. Place looks awesome.

    The issue:

    Between one specific page and the next, the user tends to get stuck in a loop. user submits information, clicks submit. same page loads. I believe this is only happening with users who have dodgy internet connections, it's especially bad for people that are logged in through something like airport or hotel wifi. No one with a half-way good connection seems to run into the loop. It's really frustrating. I'm having an issue searching anything up.. any good info or links to point to? I can RTFM.

    Cheers all,

    -yum
     
    mbg_oioi, Sep 19, 2012 IP
  2. awood969

    awood969 Member

    Messages:
    186
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    40
    #2
    Would you be able to post your code for me to have a look at?
     
    awood969, Sep 19, 2012 IP
  3. mbg_oioi

    mbg_oioi Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Not really authorized to do that, I'm just a go fetch it guy and i'm fetching zeros :) Thanks a lot for the offer though.. we were looking at it from the perspective of maybe it's something in the proxy server of open networks, or maybe something to do with disconnects or time outs.. but why refresh the same page instead of dropping a 403/404 or something.. barking up the wrong tree? Page A should create a new session on submit and user should land on page B. Instead user keeps landing on page A. it happens to a small percent of users but I'll bet it frustrates the heck out of them.

    Sorry if that's not enough info, thought i'd try =)


    And thanks again!
     
    mbg_oioi, Sep 19, 2012 IP
  4. awood969

    awood969 Member

    Messages:
    186
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    40
    #4
    It won't be a network problem. HTTP is an extra layer built on top of TCP which guarentees delivery of the right data in the right order. HTTP itself is stateless so it won't be aware that sessions are a thing.

    If your programming holds up it shouldn't matter, unless I can get a lot more information or a look at the code I won't be able to help, feel free to PM me if you'd prefer.

    Thanks
    Andrew
     
    awood969, Sep 19, 2012 IP
  5. awood969

    awood969 Member

    Messages:
    186
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    40
    #5
    Just noticing, check how your sessions are opening and closing.

    Its always a good idea to open and close sessions ONLY as needed, not just open them at the top of a page and leave them running. PHP will lock all sessions while currently in use, so when page B loads it will not see any pages page A has made until it has finished processing. PHP's session_write_close() should you be used after every session operation and then session_start() just before a read/write. This however will not solve your problem entirely so long as your programming is time dependant.
     
    awood969, Sep 19, 2012 IP
  6. mbg_oioi

    mbg_oioi Peon

    Messages:
    3
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Hey, thanks a lot. Anything helps, I'll keep all of this in mind for sure.
     
    mbg_oioi, Sep 19, 2012 IP