 | |  | | | Classifieds Bug Reports Post any problems you may be having with Classifieds here. |
June 14th, 2007, 11:12 AM
|
#1 (permalink)
| | Member Verified Customer
Join Date: May 2007
Posts: 122
| Ad deleted but images still on the disk
After you delete an ad with pictures, they still stay on the disk and take up space.
|
| |
June 14th, 2007, 11:22 AM
|
#2 (permalink)
| | Member Verified Customer
Join Date: May 2007
Posts: 122
|
If you delete specific images from the ad through ad editing, the images get deleted but when you delete the whole ad through move/delete or delete all ads from this user functions, the pictures stay on the disk.
|
| |
June 14th, 2007, 11:29 AM
|
#3 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,788
|
I have tested this functionality and it seems to work fine. I have verified after delete no files exist on disk. This code is shown in adm-product.php and seems to work fine. It is the same exact code we use on the edit script. You can clearly show we issue a statement to delete each image. I would suggest you check permissions to see if maybe you have an issue with permission of trying to delete the image. Maybe your server error logs might have some info to assist you. Code: Content visible to verified customers only.
|
| |
June 14th, 2007, 11:35 AM
|
#4 (permalink)
| | Member Verified Customer
Join Date: May 2007
Posts: 122
|
Like the instructions said the "data" folder and all its contents was CHMOD-ed 777. The files right now are CHMOD 666. I don't believe this is a permissions or a server issue. If images can be deleted with the edit function, the same should apply when you delete the whole ad. Shouldn't Classifieds notify me of an error in that case? Would debug mode help?
|
| |
June 14th, 2007, 11:39 AM
|
#5 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,788
|
Debug mode in global options is for mysql errors.
You should see an error printed on screen at top if you have problems deleting an image as your php should print that error.
I have tested this several times now as posted above. I upload an ad and delete it through the move delete function on showproduct screen which is what your reporting. That calls the form for adm-product.php and triggers the code I noted. remove_all_files is called for every last filename to remove that file.
I refreshed my ssh connection through my winscp to relook at the data directory and sure enough all files are deleted.
Here is a thought. In your pp-inc.php file there is the function remove_all_files why not remove the @ off the front of the @unlink statements and that will give you an error which you can in turn post here and might give some more specific reason for your issue.
|
| |
June 14th, 2007, 12:18 PM
|
#6 (permalink)
| | Member Verified Customer
Join Date: May 2007
Posts: 122
|
Right, made a mistake in one of my previous posts. The images do not get deleted only when using "Delete All User Ads" option. They do get deleted when you use the Move/delete function. My bad.
Here are the error codes I got when I removed the @ Move/delete (images get deleted)
Warning: unlink(/var/www/forum.bmwslo.com/oglasi/data/2/thumbs/1.jpg) [function.unlink]: No such file or directory in /oglasi/pp-inc.php on line 2802
Warning: unlink(/var/www/forum.bmwslo.com/oglasi/data/2/thumbs/2cc.jpg) [function.unlink]: No such file or directory in /oglasi/pp-inc.php on line 2802 Delete All User Ads (images do NOT get deleted)
Look at the error list in the attached file.
|
| |
June 14th, 2007, 12:20 PM
|
#7 (permalink)
| | Member Verified Customer
Join Date: May 2007
Posts: 122
|
BTW, line 2802 in my pp-inc.php file is:
unlink("{$Globals['datafull']}$thecat/thumbs/$filenoext.jpg");
|
| |
June 14th, 2007, 12:39 PM
|
#8 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,788
|
Make sure in adm-misc.php the variables in bold are defined $catid Code: Content visible to verified customers only.
|
| |
June 14th, 2007, 12:49 PM
|
#9 (permalink)
| | Member Verified Customer
Join Date: May 2007
Posts: 122
|
The bold parts are not included in my code. I added them and I still got the same errors only now the images did get deleted but the ads are still visible on the main page amon the Recent Ads (no images though). When I click on them, it says they are no longer in the database. Tried both browsers so it's not a stored cache thing...
|
| |
June 14th, 2007, 12:55 PM
|
#10 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,788
|
Thats a cache thing if everything is done but the cache does not update. I wonder why yours doesnt update Code: Content visible to verified customers only.
Try replacing the update_catcache(); with this Code: Content visible to verified customers only.
|
| |
June 14th, 2007, 01:05 PM
|
#11 (permalink)
| | Member Verified Customer
Join Date: May 2007
Posts: 122
|
OK, posting another ad removed the two "dead" ads and now with this new cache script, it works OK but I still get that long list of warnings. Is that supposed to happen?
|
| |
June 14th, 2007, 02:41 PM
|
#12 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,788
|
If everything works fine your free to put back the @ that you removed off the unlink statements so you could see your error.
|
| |
June 14th, 2007, 02:42 PM
|
#13 (permalink)
| | Member Verified Customer
Join Date: May 2007
Posts: 122
|
Will these fixes be included in the latest build?
|
| |
June 14th, 2007, 02:43 PM
|
#14 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,788
|
I beleive they already are but if not they are in my copy and it will be next time I update it
|
| |
June 14th, 2007, 02:50 PM
|
#15 (permalink)
| | Member Verified Customer
Join Date: May 2007
Posts: 122
|
Great, thank you for your help. |
| |
June 14th, 2007, 02:51 PM
|
#16 (permalink)
| | Photopost Developer Verified Customer
Join Date: Jun 2002 Location: Abingdon,MD
Posts: 66,788
|
Not a problem
|
| | |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | | | | Thread Tools | | | | Display Modes | Rate This Thread | Linear Mode | |
Posting Rules
| You may not post new threads You may not post replies You may not post attachments You may not edit your posts HTML code is Off | | | All times are GMT -5. The time now is 06:19 AM. | |