Site migration issues

Events happening in the community are now at Drupal community events on www.drupal.org.
ronnienorwood's picture

I finally got around to migrating a site from my localhost over to a real hosted site so I could simulate working with a production site. I tried to go from the info in Gary's presentation month before last. I copied all of the folders over from the localhost root but am running into a couple of issues that maybe someone has run into before. I am using the garland theme, which allows for different color schemes. If I use the default, everything looks fine - like at this subdomain:

http://store.ronnienorwood.com

If I try to use a color scheme other than the default, I get this:

http://marty.ronnienorwood.com

You can see that it loses its theming and also I get the lovely red X up in the upper left-hand corner where the image should appear like it does on my localhost. The value in the 'Path to custom logo:' box is sites/default/files/garland_logo.jpg and that is where the image is and it is fine but the system won't display it. It seems I didn't copy something over that I should have but I am not sure what I am missing.

Comments

Did you check file permissions and ownership?

gecnexus's picture

In a typical setup Apache runs as the user "nobody", but when you copy files from your localhost configuration to your website, they are owned by the user copying the files over. This can create problems accessing or deleting files from within Drupal, depending on how the permissions have been set. You can use your CPanel or an FTP program such as FileZilla to check these permissions.

Have you tried changing the Garland theme to another of the color options and seeing if it works. The new color option will create a subdirectory within the files directory with "nobody" as the owner. On my system, the Garland color change results in the creation of a /default/files/color/garland-97685a/ directory for the color I chose.

Also, your http://store.ronnienorwood.com/ site seems to be missing the logo as well.

Some help

mikew_is's picture

which files/directories owners need to be changed in order to get the site working properly.

I ftp into my dev environment as the dev user and pull a tarball of my site and the mysql dump to my "live" server.
I then unpack everything, import the DB, change the setup.php file.

When i try to delete content i get all these errors and warnings that at the end say "includes/file.inc on line "

I try and change permissions on files to 777 but still no luck.

What is the full text of one

pglatz's picture

What is the full text of one of the error messages? Can it not find the file?

Making permissions broader isn't always a good solution, as it can defeat security. Some hosts, like site5, won't run a page if the directory or a script file is group writable.

Also, do you mean you edit the settings file? You don't need to do that; instead, create a directory corresponding to your site name, make a copy of settings.php there, and edit it - you can have a settings file for each target host. i.e. sites/www.myhost.com/settings.php

Lastly, instead of making a code tarball, get familiar with git. It makes deploying much easier (and faster), and will help ensure your different versions of the site stay in sync.

Lots to learn, but it is considered good practice in the Drupal world these days, and will make life much easier!

Thanks for your input,

ronnienorwood's picture

Thanks for your input, gecnexus. I figured out what was causing the problem and it was just a case of me knowing just enough to be dangerous. The short version of what I discovered is that awhile back I was having a timeout problem on my localhost so at the suggestion of someone on a past drupal.org thread, I added a line of code to the .htaccess file on the sites/default/files folder to try to fix it. This file then got copied over to my site & its subdomains when I did the migration. Everything works fine now that I removed the line I added. This seems to explain why it did not allow access to the garland_logo.jpg file in the folder nor the color folder within the files folder containing the non-default color scheme files.

Sacramento Area

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: