| | |
Session end
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Sep 2004
Posts: 3
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by Shorty
That depends on what session method you are using. Are you using standard file based sessions or have you written a session handler that uses MySQL?
(assuming I have understood your question correctly).
Regards
Martin Bratbo
If I'm not mistaken PHP automatically handles garbage collection and cleanup when a session ends. That is provided you haven't declared any custom session handlers using session_set_save_handler().
•
•
Join Date: Mar 2006
Posts: 2
Reputation:
Solved Threads: 0
PHP does handle it's own garbage colleciton. What I was getting at was the ability to save uploaded files to a custom temp directory (not php tmp) but delete those files when the session was destroyed.
I'm getting around this buy actually loading the file contents into the session. makes for a large session file but that is the only problem i've had so far.
I'm getting around this buy actually loading the file contents into the session. makes for a large session file but that is the only problem i've had so far.
•
•
•
•
Originally Posted by DanceInstructor
If I'm not mistaken PHP automatically handles garbage collection and cleanup when a session ends. That is provided you haven't declared any custom session handlers using session_set_save_handler().
•
•
Join Date: Jun 2009
Posts: 124
Reputation:
Solved Threads: 11
I think there is no direct way in PHP. This can be done using Global.aspx file in asp.net.
For PHP work around, we can keep the list of created sessiond and then checking for the each sessions if they are available. If any session is found destroyed, we can delete the uploaded files by that session. However, this adds additional efforts managing the session tables along with the list of uploaded files per session.
For PHP work around, we can keep the list of created sessiond and then checking for the each sessions if they are available. If any session is found destroyed, we can delete the uploaded files by that session. However, this adds additional efforts managing the session tables along with the list of uploaded files per session.
![]() |
Similar Threads
- PHP Session Variables (PHP)
- Session (PHP)
Other Threads in the PHP Forum
- Previous Thread: please refine these codes for slideshow of images.....
- Next Thread: Cron problem
| Thread Tools | Search this Thread |
apache api array beginner binary body broken cakephp checkbox class cms code computing cron curl database date date/time delete display dynamic echo email error file files filter folder form forms function functions gc_maxlifetime global google host href htaccess html image include insert ip javascript joomla limit link list login mail memmory memory menu mlm msqli_multi_query multiple mycodeisbad mysql navigation oop parameter parsing paypal pdf php problem query radio random recourse recursion regex remote script search seo server sessions sms snippet source space sql static syntax system table thesishelp tutorial update upload url validator variable video web webdesign wordpress xml youtube






