View Single Post
Old Jan 17th, 2008, 4:51 PM   #6
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 1,886
Rep Power: 5 Sane will become famous soon enough
Send a message via MSN to Sane
Re: register_shutdown_function() not behaving as expected

I'm having permissions trouble with the server space I haven't yet been able to run PHP scripts on. I'll get back to you when I resolve that.

I don't know much about what you're trying to accomplish. I'm not sure if many do. But are you sure it's something standard? Seems unlikely that a user abort could trigger a function consistently.

I'm also wondering... maybe it only knows that the user aborted when it attempts to send a packet of data to the client, and sees that it's disconnected. When you've got the client hanging on a 30 second timeout, there's no data being transferred, right? So how would it know that the user clicked stop, unless there's some hidden communication going on? Maybe you could try outputting an infinite loop of numbers or something, and set a max running time on the script. Replace this with your sleep timeout.
Sane is offline   Reply With Quote