View Full Version : How do I clean up data directories?
November 14th, 2006, 11:21 PM
I've been testing PhotoPost and PP Classifieds on my sites, I have deleted all the photos that I uploaded, the photos are not on the site but they are still in the data directories. How can I clean up my data directories? Should I empty them one by one with ftp, or can I simply delete all subdirs in /data? Or is there another way?
I'd like to know for both PP and PP Classifieds.
November 15th, 2006, 08:57 AM
If you delete a photo or ad it should delete the image in the data directory.
November 15th, 2006, 02:18 PM
Appearantly it doesn't delete the photos in my data directory. There are no ads in classifieds/personals on my site and there are no photos in photoposts' gallery on my site because I deleted all ads and photos but my data directories of both scripts still contain lots of photos.
November 15th, 2006, 03:02 PM
was this before you corrected may bad paths. we clearly delete the photos or attempt to. That is right in your photopost pp-inc.php file. Whenever we delete a file we call remove_all_files so without more info here I do not know what to tell you. If I upload a file and then delete it the file is deleted off my server.
function remove_all_files( $filename, $medsize, $uid, $thecat )
$theext = get_ext($filename);
$filenoext = get_filename($filename);
// Try everything
November 15th, 2006, 06:12 PM
What do you mean with 'before you corrected may bad paths'?
I see that code in my pp-inc.php file, doesn't seem to be working though.
For now, can I manually remove all photos from the data directory? I assume I should do that without deleting the subdirectories in /data ?
November 16th, 2006, 01:17 AM
Maybe you had bad path statement just making a guess here
If I upload a photo and delete it the file is deleted
November 16th, 2006, 04:42 AM
Not that I'm aware of. And it's a bit funny/strange/coincidence that it occurs in both PhotoPost and PP Classifieds, isn't it?
Isn't there some setting that could be causing this?
Can I manually delete files? Or all subdirectories in data? I'm not sure if new subdirs will be created automatically after I deleted them.
November 16th, 2006, 08:37 AM
You would also have an issue where your server is not allowing deletion of the files for whatever reason. Maybe because of an ownership issue like your server is throwing the files to be owned by nobody and the script can not delete files by nobody? Just a thought you need to do some testing in that regards as this would appear to be a server permissions issue in that regard and not Photopost oriented. We do clearly attempt to delete the files as I noted by showing that code above.
You can delete files all you want but you can not delete directories
vBulletin® v3.8.1, Copyright ©2000-2014, Jelsoft Enterprises Ltd.