Hi,
I just uploaded the drupal files and database export from localhost to a remote host. I did this by following instructions here:
http://drupal.org/node/415846
Now I cant see any images on the remote host. The logo is missing and the CCK images are missing.
I noticed someone else had a similar problem:
http://groups.drupal.org/node/22104
but the solutions in that post didn't seem to help.
I have checked the path to the images in firebug, compared it with the file path seen using Filezilla, and it seems that the path is correct.
I have also checked the file permissions. Just to be sure, I set everything below "\sites\default\files" to "777"
I have taken a look at .htaccess in the files directory. It contains:
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006
Options None
Options +FollowSymLinks
Maybe a clue: On localhost the site is installed in a "drupal" subfolder, while online it is in the root directory. Since the paths look OK I dont see how this can be the problem though.
Another thought: I exported the database locally from command line and imported on the remote host using PHPMyAdmin. Does it matter that it was not the same process/tool?
My site is at www.romantikpensionen.de
Any suggestions? Input would be fantastic!
Cheers,
Jim
Comments
Should this post be in the installation section
Hiya,
Am I posting this in the right section?
Cheers,
Jim
This is the right place. Are
This is the right place. Are you sure your images are on the server? You may want to double check that the images are posted as what you are expecting. For instance, there is an image, http://romantikpensionen.de/sites/default/files/imagecache/header_image_... page 5 (3)_1.jpg that is not rendering on your site. I am not sure, but that looks like a funny URL, and won't work. I might be that imagecache isn't working as expected. When you migrated, did you do a MySQL dump?
Hi lazycatch, Thanks for
Hi lazycatch,
Thanks for taking a look at this. Now I am getting the impression there could be a couple of problems here.
1) I see what you are saying. The path to an image you described above is certainly not correct.
Yes, when I migrated I used command line to dump the tables. However at the local host I imported via PHPmyadmin. Do you think this could cause the problem? Anyway, I will start from scratch, doing everything with PHPmyadmin and see what happens...
2) The Logo image is certainly in the location where it should be.
Here is the path as shown in Firebug:
<img id="logo-image" alt="Home" src="/sites/default/files/romantic_logo.jpg"/>Does this look OK to you? Somewhere in a forum I think I saw that it should not start with "/" so this might be another imagecache problem.
Anyway, I will start from scratch and see what happens. More soon. Thanks for your input!!!!
Cheers,
Jim
Hi again, So, I migrated
Hi again,
So, I migrated again from scratch
This time I used PHPMyAdmin for the database export and import.
I also checked that the path is the same in the localhost and remote hosted version.
Strangely, some of the images where not copied correctly by FTP on the hosted version so I copied them again. Still the images did not show correctly.
Also strange is that the logo images does not work either. For this reason I am thinking the problem is something other than imagecache.
Note that on my local host the path is slightly different from on the remote host because I use a sub folder
Localhost path to logo image:
/drupal/sites/default/files/romantic_logo.gifRemote host path to logo image:
/sites/default/files/romantic_logo.gifDo you think this could be causing a problem?
When I delete .htaccess, the
When I delete .htaccess, the problem goes away.
Specifically, I have to delete the row.
SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006Clearly deleting this is not the right solution.
Any thoughts on what I can do to investigate this further?
Comment out "SetHandler" works but is it a security risk?
It is definitely a problem related to .htaccess.
I see that a number of people have had the same problem and chosen to comment out the line:
#SetHandler Drupal_Security_Do_Not_Remove_See_SA_2006_006http://drupal.org/node/552624
http://drupal.org/node/85974
http://drupal.org/node/347140
My impression is that this creates a security risk since someone could now upload and run a php file. Is this true? Does anyone suggest a different, safer solution?
Cheers,
Jim
Did you flush your caches?
I notice that you didn't mention flushing your cache (admin/settings/performance -> "Clear cached data").
This needs to be done every time we move something around. It fixes up internal links too if you're using something like http://drupal.org/project/pathologic, (which is quite useful!)