Zen Cart Logo
Forums / Installing on a Windows Server / Problem installing local copy of live site

Problem installing local copy of live site

Views: 6,206

Results 1 to 11 of 11
20 Nov 2012, 7:51 PM
#1
nohug4u avatar

nohug4u

New Zenner

Join Date:
Feb 2010
Posts:
16
Plugin Contributions:
0

Problem installing local copy of live site

Currently my site is at HostGator, but now I need to make a local copy so I can test out some major changes to my site.

I loaded xampp 1.8.1 onto my local Windows 7 machine, and then installed Zen Cart v1.5.0 which is also the version on my livesite. I then followed the instructions in the FAQ Zen Cart Support - I want to move my Zen Cart installation to another host or a different server.

Right before I import my live store database into the new database I’ve created on my local machine I’m able to access my store, log in to my admin, and access phpmyAdmin. Everything seems good.

My problem comes in when I import the database and run the Fix_Cache_Key utility. I place the fix_cache_key.php file in the directory xampp/htdocs/store and then open Internet Explorer and enter the url https://www.mydomain.com/store/fix_cache_key.php but all I get is the error “Internet Explorer cannot display the webpage”. In Chrome I get “The requested URL /store/fix_cache_key.php was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.” In Firefox I get “Content Encoding Error. The page you are trying to view cannot be shown because it uses an invalid or unsupported form of compression.”

I then tried to access my admin page and my store, but those attempts were unsuccessful with the same error messages from the browsers. I can access the xampp and phpadmin pages though.

As a newbie to php and sql, I’m not sure what information I need to provide to shed light on my exact problem, so I’m just going to mention some random things that I hope are important…

My live site runs on a linux server running Apache 2.2.22, MySQL 5.5.23-55, and PHP 5.2.17. The XAMPP package I loaded on my Windows 7 64 bit machine includes Apache 2.4.3, MySQL 5.5.27 and PHP 5.4.7.

My live site has the following add-ons loaded:
Ceon Advanced Shipper 5.0.2
Crafty Syntax 2.14.6
Ceon URI mapping SEO 3.6.3
CKEditor 3.6
CSS horizontal drop down menu 1.5
Facebook sidebox 1.0
Twitter updates sidebox 1
Ultimate cross sell 1.0

The livesite uses two databases, the main database which also includes the tables for Ceon Advanced Shipper, and a second database for the Crafty Syntax addon. When setting up the local Zen Cart installation, I created one database for the main database, and I only imported the main database into the newly created local database.

In the configure.php files for the live and local sites the database prefix is set to zen_.

The name, username and password of the main database on my livesite is different from the newly created database on my local machine, but I’m fairly sure that shouldn’t affect anything.

The live site has a dedicated SSL certificate but the local site doesn’t.

I've gone through the install process 3 times now trying to identify a step I've missed and I've searched the forums when i was unsure about a step, but I think I've done everything correctly. Obviously not. Whatever help you can give me is greatly appreciated!

20 Nov 2012, 8:11 PM
#2
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: Problem installing local copy of live site

I use Xampp 1.18 and Zen Cart 1.51 locally no problems.

https://www.mydomain.com/store/fix_cache_key.php

don't you mean

locahost/store/fix_cache_key.php?

20 Nov 2012, 9:00 PM
#3
jc8125 avatar

jc8125

Zen Follower

Join Date:
Oct 2007
Posts:
143
Plugin Contributions:
0

Re: Problem installing local copy of live site

do you have gzip compression enabled on your live site? one of our sites does, and when i import db into xampp i always forgot to turn it off, thus throwing the "unsupported compression" error. might not be your issue, but the error caught my eye.

21 Nov 2012, 1:48 PM
#4
nohug4u avatar

nohug4u

New Zenner

Join Date:
Feb 2010
Posts:
16
Plugin Contributions:
0

Re: Problem installing local copy of live site

don't you mean

localhost/store/fix_cache_key.php

?

After installing XAMPP I set up my local domain by editing c:\windows\system32\drivers\etc\hosts by adding the line: 127.0.0.1 https://www.mydomain.com. After doing some searching on the internet, my understanding is that my local host is now https://www.mydomain.com and that I should be able to run fix_cache_key by entering the url https://www.mydomain.com/store/fix_cache_key.php. That makes sense to me, because before I encountered my problem I was able to access my admin page by entering the url https://www.mydomain.com/store/myadmin/

If this is incorrect I'm not sure why. Just to test it, I did try to access fix_cache_key by substituting localhost for https://www.mydomain.com. Still no luck...

21 Nov 2012, 2:01 PM
#5
picandnix avatar

picandnix

Totally Zenned

Join Date:
Dec 2010
Location:
UK
Posts:
1,780
Plugin Contributions:
2

Re: Problem installing local copy of live site

NoHug4u:

After installing XAMPP I set up my local domain by editing c:\windows\system32\drivers\etc\hosts by adding the line: 127.0.0.1 https://www.mydomain.com. After doing some searching on the internet, my understanding is that my local host is now https://www.mydomain.com and that I should be able to run fix_cache_key by entering the url https://www.mydomain.com/store/fix_cache_key.php. That makes sense to me, because before I encountered my problem I was able to access my admin page by entering the url https://www.mydomain.com/store/myadmin/

If this is incorrect I'm not sure why. Just to test it, I did try to access fix_cache_key by substituting localhost for https://www.mydomain.com. Still no luck...

I agree with the theory of Torvista, after all why would the address start www. as you are using localhost not the world wide web.

21 Nov 2012, 2:12 PM
#6
nohug4u avatar

nohug4u

New Zenner

Join Date:
Feb 2010
Posts:
16
Plugin Contributions:
0

Re: Problem installing local copy of live site

I have a Reseller account with Host Gator and my understanding is that gzip compression is not available for Reseller accounts, although I must profess ignorance as to what that actually means.

When exporting my live database i do have the option of compressing the file using zip or gzip though. I opted to zip the database and when I look in phpmyadmin for my local site it does appear that all of the tables are present... I tried exporting the file without compression however the file is too large to import into my local database - the file size is limited to 2,048KiB.

21 Nov 2012, 2:24 PM
#7
nohug4u avatar

nohug4u

New Zenner

Join Date:
Feb 2010
Posts:
16
Plugin Contributions:
0

Re: Problem installing local copy of live site

picandnix:

I agree with the theory of Torvista, after all why would the address start www. as you are using localhost not the world wide web.

Okay. I cleared my browser's cache and typed into the url line localhost/store/fix_cache_key.php

Nothing happens.

21 Nov 2012, 3:15 PM
#8
jc8125 avatar

jc8125

Zen Follower

Join Date:
Oct 2007
Posts:
143
Plugin Contributions:
0

Re: Problem installing local copy of live site

NoHug4u:

I have a Reseller account with Host Gator and my understanding is that gzip compression is not available for Reseller accounts, although I must profess ignorance as to what that actually means.

When exporting my live database i do have the option of compressing the file using zip or gzip though. I opted to zip the database and when I look in phpmyadmin for my local site it does appear that all of the tables are present... I tried exporting the file without compression however the file is too large to import into my local database - the file size is limited to 2,048KiB.

if you go into the live store admin, look at configuration->gzip compression. is it set to 1? if it is, you can either:
change it to 0 (disabled). Then export database from live site. Import into local site. Dont forgot to turn back on live site after export.

or you can run sql query on local site to update the configuration switch. again, not sure if this is your problem - but it sounds like exactly what i've experienced.

ps - I'm actually just performing a workaround - I suppose the true solution would be to enable gzip compression on your copy of xampp (google "enable gzip compression xampp"). Haven't gone that route myself, but probably would save a little headache.

if gzip compression is disabled (set to 0) on the live store, than just pretend like i'm crazy and move on. :)

21 Nov 2012, 3:40 PM
#9
nohug4u avatar

nohug4u

New Zenner

Join Date:
Feb 2010
Posts:
16
Plugin Contributions:
0

Re: Problem installing local copy of live site

Thank you sooo much! I changed the gzip compression value to zero and it worked! I just wish I'd posted my question a week ago when I first had my problem...

21 Nov 2012, 7:51 PM
#10
torvista avatar

torvista

Totally Zenned

Join Date:
Aug 2007
Location:
Gijón, Asturias, Spain
Posts:
2,866
Plugin Contributions:
7

Re: Problem installing local copy of live site

I changed the gzip compression value to zero and it worked!
Great!
I didn't suggest that as it works on my local xampp and I haven't done anything to make it work.

You may find in the future that using apache and virtualhosts may serve you better than a redirect in the windows hosts file.
Then you can set up for example: https://www.mydomain.local
and use separate configure.phps in /local folders to keep your original configure.phps intact/no danger of overwriting when you are doing comparisons/no need to mantain different versions.

May seem a fuss for most people but I use local copies on up to three pcs/laptops to be able to work when travelling..

16 Dec 2014, 7:52 PM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: Problem installing local copy of live site

FYI, ZC v1.5.4 should mitigate against the problem of mixed content decryption problems as reported in this thread.