I'm at a loss for a way to clean up when a session expires.
I'm working on a system that allows a user to upload an image, specify a few options, and then place an order. The uploaded image is copied to a directory named with the session ID. When the order is finalized, the user options are saved in a text file and the directory is renamed to something more user-friendly.
What I'm looking for is a way to clean up after users who upload something, but don't complete an order. I'd like to let PHP garbage collection take care of it, but file uploads don't hang around in /tmp after the request ends, which (as far as I can tell) rules that out as soon as I copy them elsewhere.
Thanks is advance for any help!
-scott