SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Guru
    Join Date
    Feb 2004
    Location
    Oregon
    Posts
    686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    detecting if a connection has been left open

    it is possible to detect if a persistant connection as been left open forever?

    I use mysq_pconnect and it seems that if the browser crashed or the user lost connection and the page didn't load correctly that the connection would still be open. is there a way to detect this in php code so I can close it or whatever. I know you can't use mysql_close on it so maybe there is something else I have over looked.

    like set a timeout ror something
    success is not by chance, it is by choice.

  2. #2
    SitePoint Enthusiast nking's Avatar
    Join Date
    Aug 2003
    Location
    Bloomington, IL
    Posts
    48
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well, when the script execution ends, the connection will be closed. Its server-side, so its not dependant on the client.

  3. #3
    SitePoint Guru
    Join Date
    Feb 2004
    Location
    Oregon
    Posts
    686
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well that is just it, what if the client never finishes the script?
    success is not by chance, it is by choice.


Bookmarks

Posting Permissions

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