Damo Posted September 16, 2014 Share Posted September 16, 2014 Regardless of the date chosen I get the message: Could not delete file: Filename invalid. when attempting to clean up old attachments to the helpdesk. Any help would be appreciated 0 Quote Link to comment Share on other sites More sharing options...
HostXNow Posted January 25, 2015 Share Posted January 25, 2015 Am getting the same error... 0 Quote Link to comment Share on other sites More sharing options...
Administrators WHMCS John Posted January 26, 2015 Administrators Share Posted January 26, 2015 Hi, This suggests that either the path to your attachments directory in the configuration.php file is invalid (you'd also get an error when attaching new files if that's the case). Or it could be that file being deleted has already been removed from the /attachments directory outside of WHMCS and now it can't find it to delete as part of the cleanup operation. 0 Quote Link to comment Share on other sites More sharing options...
AlpineWeb Posted February 4, 2015 Share Posted February 4, 2015 We are experiencing the same problem. The path to the attachments directory is correct, permissions and ownership are correct and there are no problems receiving tickets with attachments. The explanation that there may be "an attachment that has already been removed" is noted. Don't leave us hanging here. Please follow through with a solution. Thank you, Uwe Schneider 0 Quote Link to comment Share on other sites More sharing options...
HostXNow Posted February 10, 2015 Share Posted February 10, 2015 Hi,This suggests that either the path to your attachments directory in the configuration.php file is invalid (you'd also get an error when attaching new files if that's the case). Or it could be that file being deleted has already been removed from the /attachments directory outside of WHMCS and now it can't find it to delete as part of the cleanup operation. Attachments are being added fine so guess it is not an issue with path but rather whmcs not finding them and not completing clean operation. How to correct this? 0 Quote Link to comment Share on other sites More sharing options...
HostXNow Posted February 10, 2015 Share Posted February 10, 2015 This is a bug as I deleted all attachments from attachments folder using FTP and went back to Cleanup Operations page which reported Prune Old Attachments Number of Saved Attachments: 0 Filesize of Saved Attachments: 0 MB I added attachment to a support ticket which was uploaded fine as going back to the ticket showed the thumbnail of the image, I could see the file exists via SSH and see WHMCS now shows the newly uploaded image Prune Old Attachments Number of Saved Attachments: 1 Filesize of Saved Attachments: 0.19 MB So I set the date to 11/02/2015 (tomorrow) so it deletes all attachments before 11/02/2015 (today) but WHMCS again reported "Could not delete file: Filename invalid". So attachments add fine but cleanup operations is not deleting anything even though the permissions are correct? 0 Quote Link to comment Share on other sites More sharing options...
ethix Posted March 11, 2015 Share Posted March 11, 2015 Just came across this thread via Google as I have the same issue. 0 Quote Link to comment Share on other sites More sharing options...
Patty Posted October 2, 2017 Share Posted October 2, 2017 Same thing here, even on v7.2.3 0 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted October 2, 2017 Share Posted October 2, 2017 1 hour ago, Patty said: Same thing here, even on v7.2.3 Hey @Patty Do you have the same issue attaching files? 0 Quote Link to comment Share on other sites More sharing options...
Patty Posted October 2, 2017 Share Posted October 2, 2017 Hi Chris. No problem attaching, just pruning attachment files from system clean up. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted October 2, 2017 Share Posted October 2, 2017 9 hours ago, Patty said: Hi Chris. No problem attaching, just pruning attachment files from system clean up. Hey @Patty Could you check the configuration.php file and make sure the path is correct, is it possible that someone removed some of the files from this directory? 0 Quote Link to comment Share on other sites More sharing options...
Patty Posted October 3, 2017 Share Posted October 3, 2017 (edited) Hey, Chris. There's no path to attachments directory on the configuration file. What's it supposed to be? And I did delete files manually several times throughout the years, for this function never worked for me. Edited October 3, 2017 by Patty 0 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted October 3, 2017 Share Posted October 3, 2017 Hey @Patty It would look something like: $attachments_dir = '/home/<USERNAME>/whmcsdata/attachments/'; 0 Quote Link to comment Share on other sites More sharing options...
Patty Posted October 3, 2017 Share Posted October 3, 2017 Tks, Chris. But are you show this is the correct path to use? I added it to my configuration file and now the System Clean Up page on admin won't even load. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted October 3, 2017 Share Posted October 3, 2017 Hi Patty, You would need to adjust the path to match your current attachments directory the above was only an example 0 Quote Link to comment Share on other sites More sharing options...
Patty Posted October 3, 2017 Share Posted October 3, 2017 Yes, I did that, of course. But cleanup page won't load when I add that to the config file. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS ChrisD Posted October 3, 2017 Share Posted October 3, 2017 51 minutes ago, Patty said: Yes, I did that, of course. But cleanup page won't load when I add that to the config file. Hmm that is indeed odd, feel free to remove that path and manually empty the attachments directory 0 Quote Link to comment Share on other sites More sharing options...
Patty Posted October 3, 2017 Share Posted October 3, 2017 Yeah, well, that's what I've been doing since forever. But it should work as expected from the admin side and that's what I was hoping to accomplish. 0 Quote Link to comment Share on other sites More sharing options...
HostXNow Posted October 3, 2017 Share Posted October 3, 2017 @Patty I had the same issue some time ago! You can fix it by removing all uploads from the attachment folder and emptying the row for attachments for responses in MySQL database. You should have admin help you do that as it is risky! Once done that the WHMCS feature should work again. 0 Quote Link to comment Share on other sites More sharing options...
WHMCS Developer WHMCS Andrew Posted October 3, 2017 WHMCS Developer Share Posted October 3, 2017 Other than the error you see on the page, do you get any other error in your Activity Log? 0 Quote Link to comment Share on other sites More sharing options...
Patty Posted October 3, 2017 Share Posted October 3, 2017 (edited) Tks for the tip, HostXNow, but I don't want to lose all files, just the very old ones. Maybe a sql command to delete the attachment if the date is older than d/m/y?? How would that be? I'm no programmer, sorry for my ignorance. Andrew, I don't see any error on the Activity Log. Edited October 3, 2017 by Patty 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.