There are some files in my /tmp directory all called galleryXXXXXX, where the X is some number or letter. They are all zero bytes, but the problem is they don't seem to be deleting themselves, unlike the sess_******..... files which disappear eventually.
I guess my questions are what is the function of the galleryXXXXXX files? And if there are any ideas on why they aren't deleting themselves? I can do it by hand but that's not a satisfactory solution.
I am running Gallery 1.3.1.
Thanks!
Posts: 4
Just to say that I discovered the same thing. There were around 11,000 galleryxxxx files in /tmp. All 0 length. I believe the problem is in save_photos.php...but I've yet to find a fix.
For the time being I just delete them after I upload photos...
Russ
Posts: 3474
Hi. I believe you've stumbled on a Gallery bug!!
Here's my hunch:
This only happens if you do one of the following:
-Upload a zip file via Browse
-Add links from a directory
The file is deleted if you do the following
-Upload an image/movie file via Browse
The thing is... the temp file holding the current image being processed only gets added to the "delete this temp file" list if move_upload_file() returns true. But this won't return true on the zip file images or for a local file. So those temp files never get deleted. Aha! Okay... I'm gonna go make a bug report. I'll keep you posted on the results.
-Beckett (beck@beckettmw.com)
Posts: 3474
(Posted <!-- BBCode Start --><A HREF="http://marc.theaimsgroup.com/?l=gallery-devel&m=103791618125687&w=2" TARGET="_blank">here</A><!-- BBCode End -->).
Posts: 4
Thanks Beckett for the quick reply on this. I have implemented a simple workaround (on a Linux box) until the real fix comes along.
In the file: save_photos.php
I added this line:
system('rm /tmp/gallery*');
right before this (around line 357):
if ($temp_files) {
/* Clean up the temporary url file */
foreach ($temp_files as $tf => $junk) {
fs_unlink($tf);
}
Russ
Posts: 17
Thanks Russ and Beckett for your help!
Posts: 3474
Fixed! Grab 1.3.2-cvs-b32 or wait till ~Monday and get the official 1.3.2.
Thanks for the heads up!
Posts: 4
Thanks for the extremely fast fix! I've tested out the amended
code and no more lingering temp files after zip or directory uploads.
Excellent!
Russ