0

I have copied a site I have on a VPS down to run from XAMPP on my local machine. When I restore the site using Backup and Migrate I get the error message on all pages of the site:

The specified file temporary://filemy1oSK could not be copied, because the destination directory is not properly configured.

I have clean installs of drupal running fine on XAMPP. On the File System configuration page (admin/config/media/file-system) they use '/Applications/XAMPP/xamppfiles/temp/' so I have tried using this and '/Applications/XAMPP/xamppfiles/private/' but this doesn't fix the error.

There is a similar Drupal Answers Question, about moving a site from local up to a VPS I have tried to work through the suggestions there to no effect. The top answer recommends advice from this site. Following this to avoid starting the file paths with a forward slash I tried using 'sites/default/files/private/' and 'sites/default/files/temp/'but this doesn't fix the error either.

As this is a local install, security is less of an issue. I have been setting the above directories to 777 to ensure that there are enough permissions. I have also made 'sites', 'sites/default' and 'sites/default/files/' 777.

Possibly incidentally, clean URLS weren't working on the the local install, even though they work fine on the fresh installs of Drupal. This stopped the links on the site working. I disabled them by going to http://localhost/sitename/?q=admin/config/search/clean-urls and the site links now work without clean URLS

Also possibly incidentally, I got an error message when I used the site files I downloaded to install with a clean database. I did this so I could install the backup migrate module and restore the site properly. At the end of the install I got the error:

Deprecated function: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead in _acquia_profile_create_node() (line 158 of /Applications/XAMPP/xamppfiles/htdocs/sitename/profiles/acquia/acquia.profile).

I don't have any admin menu and the overlay admin screens aren't working. I am assuming this is a result of the temporary files error.

Any advice?

3
  • If I set the public folder to one outside of my drupal installation (../public) I can clear cache and don't see any errors, however images for the site aren't available. I have tried following this advice about setting permissions my sites/default/files folder, but each time I set the public folder to sites/default/files the themes don't show. Changing to default themes does not help. Feb 12, 2015 at 17:15
  • I installed the site on a pc using the files and starting with a blank database. After running setup, I noted the settings for the files: Public (sites/default/files), Private (blank), Temp (C:\xampp\tmp). Then I restored using backup and migrate, and changed the files I downloaded from the VPS settings back to what they had been before. After flushing the cache the site without the problems listed above. Therefore the issue seems particular to mac, or possibly the specific mac am usually working on. Feb 13, 2015 at 12:01
  • This finally stopped being an issue. I'm sorry but I'm not sure what exact steps fixed it. Mar 13, 2015 at 17:41

2 Answers 2

1

This issue has nothing to do with Drupal config. Its related the your tmp folder permission. You got to update the tmp folder permission, so that apache user have proper write permission.

chmod -R 0700 chmod -R 0700 /tmp

3
  • '/Applications/XAMPP/xamppfiles/temp/' has 777 permissions. This folder works for the fresh Drupal installs in XAMPP so I don't understand why it wouldn't also work for the site copied from the VPS Feb 11, 2015 at 16:17
  • is this the folder configured in your Drupal Temp Folder configuration ? if not you can change that Feb 11, 2015 at 17:03
  • I have tried that on the Files system page (admin/config/media/file-system) but it hasn't made a difference Feb 12, 2015 at 9:57
0

If you set the tmp directory to same path as for working local drupal instance: Try cleaning all cache tables (cache and everything with cache_) via db (e. g. phpmyadmin) and see if this helps.

Maybe you can also try to set the tmp directory to the XAMPP path before exporting from the VPS. Set it back immediatelay after export.

If it still does not work:

You can try to just copy the files by FTP down to your local server and importing sql dump via db (e. g. mysql command line or phpmyadmin) and see if it works like this (without Backup and Migrate module). Here maybe better to also set the tmp directory before exporting.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.