Moved server, now download_file doesn't work?

Permalink
Hi all

I've recently moved server and migrated a client's website (5.4.2.2) using rsync (rsync -avr) and while the copy appeared to work, I can't access any files via download_file (e.g. by clicking download links on the site, by choosing Download in the File Manager or when viewing content blocks which include images, the paths for while use download_file).

Image are just missing, whereas e.g. PDF downloads are empty files (they do download, though). I've verified that the files do exist on the server and that they are the correct size.

I'm not sure if this is a web server or a c5 problem, but can anyone suggest anything? The site's running on a LAMP stack - nothing too exciting.

melat0nin
 
melat0nin replied on at Permalink Reply
melat0nin
Bump

Anyone have any ideas?
nteaviation replied on at Permalink Reply
nteaviation
Do you see anything in your logs?
melat0nin replied on at Permalink Reply
melat0nin
I think I've fixed it, the problem was cached files which were taken over from the old server (I disabled and cleared cache). See below (going to leave the description here for anyone else with similar problems).

------

The issue seems to be the storage location - apache logs give this when trying to download a file:

[Fri Oct 21 15:37:30 2011] [error] [client 1.2.3.4] PHP Warning:  filesize(): stat failed for /home/username/public_html/files/8013/1350/5530/cm35.pdf in /var/www/updates/concrete5.4.2.2/concrete/helpers/file.php on line 111


The site now lives in /var/www rather than /home/username/public_html. I've done a database search and changed the two references to the old location, and I've done a grep on the website's directory looking for the 'public_html' string to find any other references, but I can't find any in any important files (just cache files).
nteaviation replied on at Permalink Reply
nteaviation
Good catch! I always try to disable and clear cache prior to "snap-shotting" a site to move. Although, it's still no big deal to "clear cache" if you forget :)