View Full Version : Data Folders Issue
October 15th, 2012, 05:18 PM
I've been running PP Classifieds since 2006. Today one of my users was having a problem with an image not uploading and I had to look at my Data directly.
I found about 40 sub-directories in the Data Folder. But only 9 have anything in them. Most of those 9 that have images in them have 20K to 30K worth of content -- but one of those 9 folders (coincidentally it's "/data/9/") has 2,384,268 kb and 6500 image files in the folder.
And, a good many of these images go back to 2006.
What do I need to do about this?
Why do I have 30+ folders in my Data directory with nothing in them. And only 9 folders with files in them.
And why does the "Data/9/" subdirectory have 6 years of images in it and is it the one that is so huge?
It appears that images are not being deleted when I daily delete "expired" ads.
I've attached a screen shot of the folders with any content in them, plus a couple that have no content -- but there are 30 more folders without content, as well.
October 15th, 2012, 08:23 PM
Your data folder is the images for the ads in your site.
Nothing is an issue that I am seeing from your description. empty folders would be common if you have categories that have no content.
Folders with images are related to ads on your site. If you are running the cron task and expiring ads then when you go to admin the old ads should be deleted.
Now note I say should. We issue a delete command on the server on the file paths of any images related to the ad. Now if your server does not delete the image it could be a permissions issue.
I really can not say without clear exact information on the site. I would need to see the folder the category the database etc and see whats what.
October 15th, 2012, 11:49 PM
Perhaps the old files on the server are left over from long ago then? I run the cron job and delete expired ads every day. But years ago I know that I didn't.
I can try to delete all the old files from /data/9/ folder and see if it's keeping them purged going forward.
None of the other folders seem to be an issue at all.
October 15th, 2012, 11:52 PM
I remember discussing a similar issue here in 2008.
Here's a link: http://www.photopost.com/forum/photopost-classifieds-support/136483-photos-classifed-removed-automatically.html
October 15th, 2012, 11:55 PM
Let me ask one other question -- in my file manager, the date on the files is "date last modified". It seems that's the date last modified on my server. Not the date the user last modified it.
I ask because if I have a slue of files with a 2006 last modified date in my data folder that means the file was uploaded (or modified) on my server last in 2006. It can't mean that the user last modified the file on his computer in 2006 and uploaded it yesterday. Can it?
October 16th, 2012, 10:24 AM
The date last modified would definately always be whatever your server date it was last modified is.
Remember like I said if you upload an ad and then delete it our program will delete that image.
Now that is not to say your server did not have some type of permissions error where the file where not being deleted at some point back then maybe your permissions are wrong etc
Your asking hypothetical things here hard to really respond without seeing the problem.
If you search your classifieds products table for that image name and it is not found it would be safe to delete it.
October 16th, 2012, 11:46 AM
I did a test today and current ads are deleting the photos when they are deleted from my "expired ad" queue. So, it must be old ads.
I'll clean up all these old files and that should take care of things.
October 16th, 2012, 12:05 PM
Your welcome. I remember a similar issue with the gallery product with another user years ago.
Say for instance along time ago you had maybe permissions set incorrectly on that data directory to 755 instead of 777 it would be possible like I said that your server would not delete the files.
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.