6 replies [Last post]
gpzhumphrey's picture
Offline
Joined: 02/14/2009
Juice: 13
Was this information Helpful?

This may not have anything to do with Ubercart, but a client has been experiencing a weird phenomenon of files disappearing from the server after a customer purchases one.

The site sells e-books, downloadable after a customer pays. The typical cycle is that my client adds a new product to Ubercart and uploads the associated e-book file that customers can download after purchasing. After the first person purchases the e-book, the file is deleted off the server. However, if my client uploads it again, the file does not get deleted when subsequent customers purchase the e-book.

Anyone know why? Is this an Ubercart issue?

Weirdness abound.

Thanks,

Geoff

Geoff Humphrey
http://www.zkdigital.com

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: Files Disappearing on Server

I've only heard of this happening once, but we never heard back from the person who posted the issue:

http://www.ubercart.org/forum/support/3867/file_downloads_disappearing_a...

Can you answer the questions that I've asked there? Here they are again...

Quote:

Hmmm... can you test this by putting a file in there (one that belongs to a product) and testing the actual process (of buying and downloading)? I am doubtful that it's an issue with the module, but probably something on your server. It almost sounds to me like the folder has been copied over from a previous backup, one in which there was nothing actually contained within it.

What kind of setup are you on? Shared / dedicated? Linux / Windows? What versions of PHP? Who's your provider?

--
Help directly fund development: Donate via PayPal!

gpzhumphrey's picture
Offline
Joined: 02/14/2009
Juice: 13
Thanks

torgosPizza (your screen name reminds me that I haven't had breakfast)...

Thanks for helping me out. Here are the answers to your questions:

Quote:

Hmmm... can you test this by putting a file in there (one that belongs to a product) and testing the actual process (of buying and downloading)?

Yes. This has been tested - at least three instances have been reported from testers who helped the owner before the site went "live" officially.

In fact, the site's owner is doing an initial upload and associating it with a product, then going in and manually deleting it (as a preemptive measure). Then, she's uploading the file again.

Quote:

I am doubtful that it's an issue with the module, but probably something on your server. It almost sounds to me like the folder has been copied over from a previous backup, one in which there was nothing actually contained within it.

I actually thought of that after I posted here. The backups are manual with the ISP and I haven't generated and/or restored one yet. The weird thing is that it's just one file that's disappearing, usually the newest one uploaded, not the entire contents of the folder.

Quote:

What kind of setup are you on? Shared / dedicated? Linux / Windows? What versions of PHP? Who's your provider?

Provider: Super Green (http://www.supergreenhosting.com/)
Shared.
Apache version: 2.0.63.
PHP version: 5.2.8.
Operating system: Linux.
Dedicated IP.

Thanks again for your help.

Geoff Humphrey
http://www.zkdigital.com

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
Re: Thanks

You said that only the newest file is erased.. can you verify this by uploading one file, THEN uploading another, and seeing if still only one file is removed?

This reminds me of one of our old designers who used Adobe GoLive to update the site files, and anytime he synced the two locations, any new files I uploaded would disappear.

I'm 99.9% positive that it's something either server-bound, or something related to CVS, etc. Unless you have some kind of "auto-backup" module or script that is running and checking for any files that don't belong to it.

Can you do me another favor. Log into SSH and do an "ls -l" on the files directory. (By the way, is this a public location, or above the webroot?) I'm wondering what the permissions and ownership settings are on the files that keep disappearing, and what they are on the ones that have stayed. There's a good chance that the files being uploaded, for whatever reason don't have the correct ownership permissions on them and so the file system is removing them.

This thread makes an interesting point: http://www.linuxforums.org/forum/debian-linux-help/114604-files-disappea...

Check your lost+found directory to see if any of them show up there. That thread gives you command-line instructions to find the l+f directory. Let me know if this helps at all.

--
Help directly fund development: Donate via PayPal!

affinity's picture
Offline
Joined: 08/22/2008
Juice: 39
Same problem here...

I'm having the same problem. The last file uploaded to the file download directory (which is located outside of the web root) disappears after it is purchased and downloaded. No other files in that directory are affected. A workaround is to place a dummy file in the directory after uploading the last file, but this is not a client friendly way of dealing with the issue.

I'm puzzled as to why this is happening!?

Running:
Linux/1and1.com shared server
MySQL 4.0.27 (I know, it's outdated but I don't think that's the issue)
PHP 5
File permissions: 644 on all files in the directory

Thanks!

torgosPizza's picture
Offline
Bug FinderEarly adopter... addicted to alphas.Getting busy with the Ubercode.
Joined: 08/14/2007
Juice: 4110
PHP 5 what? Also, talk to

PHP 5 what?

Also, talk to 1and1's support, if you can get ahold of them. This is not a common issue and one I'd like to see tracked down. My initial guess is it's a conflict between the script owner and the owner (in Apache) of the files being downloaded.

--
Help directly fund development: Donate via PayPal!

affinity's picture
Offline
Joined: 08/22/2008
Juice: 39
Was this issue ever resolved?

Hi,
My client is having the same identical problem, and it's driving her nuts. I put through a purchase after I had corrected the issue (i.e. uploaded the file again outside of the webroot, attached it to the product, saved the product) and it happened to me. I was loggged in as Admin and when I got the transaction accepted page it had this error warning at the top, probably unrelated, but you never know:

user warning: Table 'db113028052.uc_file_products' doesn't exist query: SELECT description FROM uc_file_products WHERE pfid = 24 AND fid = 5700 in /homepages/30/d95278994/htdocs/elders/Members-Drupal5/includes/database.mysql.inc on line 172.

Using PHPMyAdmin I found that the table that does exist is drupal_uc_file_products.

Any help would be greatly appreciated!

Host 1and1.com (they say it's a software issue because it doesn't happen with any other files/folders/applications)
Apache 1.3.34
Perl 5.8.8
PHP 4.4.9
PHP5 5.2.13
MySQL 4.0 (Me thinks this might be the culprit)