Forums / Basic Configuration / Images not showing after migration

Images not showing after migration

Views: 2,412

Results 1 to 9 of 9
1 Apr 2015, 5:17 PM
#1
bonmot avatar

bonmot

New Zenner

Join Date:
Nov 2008
Posts:
10
Plugin Contributions:
0

Images not showing after migration

Hello. I just transferred my ZC to a new host. Now images are not showing up at all. Also, in Chrome and FF, the CSS doesn't appear to be working. It works in IE. I checked image properties and the paths appear to be correct. If I go to the images folder I can find and download and then view the image. If I try to open the image directly in the browser it just goes back to the home page.

Here are some example links:
The site is at http://www.aifashions.com/
Here is a direct image link to one image: http://www.aifashions.com/zencart/images/black.jpg

I've tried different permission settings.
I've googled it for hours and searched here with no luck.

Any suggestions as to where to start looking will be greatly ppreciated!

1 Apr 2015, 11:09 PM
#2
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Images not showing after migration

Same results when using the default ZC template?

How long has the site been on the new server?

Sure the configure.php files have been updated to the correct path(s)?

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

2 Apr 2015, 2:12 AM
#3
bonmot avatar

bonmot

New Zenner

Join Date:
Nov 2008
Posts:
10
Plugin Contributions:
0

Re: Images not showing after migration

Thanks for the questions. It really helps to have some possibilities to focus on!

mc12345678:

Same results when using the default ZC template?
Not sure. I uploaded the old files over the default as soon as it looked like the install had succeeded. I probably should have examined it a little closer but at a glance it seemed to be correct.

mc12345678:

How long has the site been on the new server?
Since this morning...perhaps 3-4 hours before I sent out this Mayday.

mc12345678:

Sure the configure.php files have been updated to the correct path(s)?
Not sure of anything! I've checked them and tweaked them and tried various alternatives repeatedly. I also suspect that this may be where the problem lies so I'll go over these again.

Thanks for the thoughts. I'll update any progress (or lack of same). Any other suggestions would be welcome in the meantime.

2 Apr 2015, 4:28 AM
#5
bonmot avatar

bonmot

New Zenner

Join Date:
Nov 2008
Posts:
10
Plugin Contributions:
0

Re: Images not showing after migration

Thannaree:

Is the store supposed to be located under the folder zencart?
These 2 links lead to the same page:
http://www.aifashions.com/index.php?main_page=product_info&cPath=14_16&products_id=74
http://www.aifashions.com/zencart/index.php?main_page=product_info&cPath=14_16&products_id=74

The shop is in a folder called zencart. I also have the server settings to point to that sub-directory so if someone types "aifashions.com" it auto directs to the store in the sub-directory.

2 Apr 2015, 2:44 PM
#6
bonmot avatar

bonmot

New Zenner

Join Date:
Nov 2008
Posts:
10
Plugin Contributions:
0

Re: Images not showing after migration

I'm beginning to suspect it may be with an .htaccess file. This seems to come up a lot as a problem. I've started by examining files in 5 locations. First, in the root directory. Then root>zencart. Next root>zencart>includes. Then root>zencart>adminChanged. Finally root>zencart>adminChanged>includes.

The one in the root directory appears to be left over from a default WordPress install that came with the hosting plan. I tried turning it off and no change. Any reason not to delete this one?

The one at root>zencart is blank.

The other three are very similar to one another. The all include the following:

# deny *everything*
<FilesMatch ".*">
  Order Allow,Deny
  Deny from all
</FilesMatch>

# but now allow just *certain* necessary files:
<FilesMatch ".*\.(js|JS|css|CSS|jpg|JPG|gif|GIF|png|PNG|swf|SWF|xsl|XSL)$">
  Order Allow,Deny
  Allow from all
</FilesMatch>

IndexIgnore */*
```[/INDENT]

The one in zencart>adminChanged also has this bit:
``` # The following makes adjustments to the SSL protocol for Internet Explorer browsers <IfModule mod_setenvif.c> <IfDefine SSL> SetEnvIf User-Agent ".*MSIE.*" \ nokeepalive ssl-unclean-shutdown \ downgrade-1.0 force-response-1.0 </IfDefine> </IfModule> #turn off X-PHP-Originating-Script header when sending emails from admin #uncomment to activate: # php_flag mail.add_x_header Off

I'm not overly fluent in htaccess particularly when there are multiple instances scattered through the site. I understood that an htaccess file in one location would apply to all subdirectories within. May be wrong. Though.

2 Apr 2015, 4:03 PM
#7
mc12345678 avatar

mc12345678

Totally Zenned

Join Date:
Jul 2012
Posts:
16,908
Plugin Contributions:
2

Re: Images not showing after migration

Correct, an .htaccess file in a root is basically inherited to its sub-folders.

ZC requires no .htaccess file in the ZC store (or above the ZC store directory, which is also one reason to not install the ZC store in a sub-folder as then there is no parent .htaccess file that could interfere.)

The .htaccess in the folders includes and also adminchanged appear as if they are default ZC .htaccess files.

Two posts ago though you said you had a redirect from the store's base uri to the sub-uri... That almost makes it seem like when calling the base uri with a folder, that it will add the folder again... And that may be your problem.. :/ I could be wrong there, but also Thannaree's observation still appears valid.

ZC Installation/Maintenance Support <- Site
Contribution for contributions welcome...

2 Apr 2015, 5:44 PM
#8
bonmot avatar

bonmot

New Zenner

Join Date:
Nov 2008
Posts:
10
Plugin Contributions:
0

Re: Images not showing after migration

So here's where I am now. I deleted everything to start anew. There had been a couple server glitches during the install that I had to sort out and don't like trying to guess if that created a problem in the install. So now I have a fresh new install everything went smoothly this time...EXCEPT! The default store opens fine. Everything is there -- CSS, images, all seems well. But I can't access the admin area. The admin log in comes up. I enter the correct credentials. I get a prompt to change the password (normal) and I do. Goes back to the log in and then just keeps cycling back to the log in. No errors and no progress to get into the admin. BTW, I have not as yet overwritten the database or site files from the old site. I'm still working with a fresh install with sample content until I get that worked out. Just can't get into the admin. I've tried numerous fixes found on line but none seem to work.

Another confusing bit is that according to the info I got from my host, the absolute path to the root is "/home/users/web/####/ipg.aifashionscom". But when I install ZC it insists that the root is "/hermes/bosnaweb04a/*####/*ipg.aifashionscom/zencart". If I try to edit this path in ZC, the site vanishes altogether. Not at all sure what that's about.

Of course the "####" are actually characters but I'm not sure if it's cool to advertise the path!?!

I also deleted the htaccess file on the root.

2 Apr 2015, 10:21 PM
#9
bonmot avatar

bonmot

New Zenner

Join Date:
Nov 2008
Posts:
10
Plugin Contributions:
0

Re: Images not showing after migration

After 2 or 3 attempts and being not much wiser as to why the site would not transfer correctly before, it is now up and running (mostly) . Still a couple scattered images not showing up but that can be dealt with later. I **have **learned that the pointer on the server is/was a troublesome element in all this. Once I had the site mostly restored, I went to my hosting CP and pointed aifashions.com to the sub-directory "zencart". No images and no css again. I changed the pointer back to the root directory and added an html redirect to the store. Good enough for now.

Thanks to everyone who weighed in on this. It really helped. Thannaree and mc12345678 were both correct in noting that the redirect on the server was probably screwing things up. In the two configuration files, I tried multiple variations in the defined urls and root path to mitigate this effect. Nothing I tried worked. I'll probably query this to the host support team to see if they can explain if not fix this problem. *After *I take a break! I will post one last update to this if I learn anything pertinent.

Thanks again all!