Forums / Installing on a Windows Server / Running copy of a ZC store on local machine...

Running copy of a ZC store on local machine...

Locked

Views: 2,995

Results 1 to 6 of 6
This thread is locked. New replies are disabled.
18 Mar 2009, 5:44 PM
#1
nadsab avatar

nadsab

Totally Zenned

Join Date:
Sep 2004
Posts:
496
Plugin Contributions:
0

Running copy of a ZC store on local machine...

Hi,

I just downloaded a copy of a live ZC store & database from Linux server onto my local machine. I also have phpMyAdmin running on my local machine with the WAMP package, my Windows XP machine is now running apache locally, and I can see / edit the store database I downloaded onto local PC in phpMyAdmin. My local apache install is able to browse local html. Php, css etc. I’d like to do some experimenting with stylesheet editing on the local machine, just so I can learn the ZC css layouts like the back of my hand, without having to do live edits on the store, until I have everything designed the way I want it. I was thinking then I could – after editing on local machine, upload the new stylesheet(s) all at once. I would also like to make some layout changes by logging into admin locally, make some changes, and then upload the database changes as well when they are done. Is this a crazy way to do it?

In order to see the store on localhost via browser just as it appears live on server, I know I have to edit configure.php and includes/configure.php and reset the paths. Are these the only two pages I would need to edit in order for the site to show locally?

When I first visited http://localhost/store the below page came up, so I’m assuming this is not too hard to do since ZC gives some basic info on switching servers, so why would there be any difference in running on a local machine...…

Hello. Thank you for loading Zen Cart™.
You are seeing this page for one or more reasons:

  1. This is your first time using Zen Cart™ and you haven't yet completed the normal Installation procedure.
    If this is the case for you, you will need to upload the "zc_install" folder using your FTP program, and then run zc_install/index.php via your browser (or reload this page to see a link to it).
  2. Your /includes/configure.php and/or /admin/includes/configure.php file contains invalid path information and/or invalid database-connection information.
    If you recently edited your configure.php files for any reason, or maybe moved your site to a different folder or different server, then you'll need to review and update all your settings to the correct values for your server.
    See the Online FAQ and Tutorials area on the Zen Cart™ website for assistance.

Anyway, I tried resetting the paths per the paths on my local machine, but that did not work. Maybe it's just a minor typo in the two configures? Or is there more to this than the two configure.php's?

Or are there more hooks – paths to reset from the php code into the database, that also need to be changed with the new path information?

Or maybe I’m doing this the wrong way. Would it be better to just install a new store on the local machine from scratch, and then import the database into the newly created store? Or would the differing installation also break hooks – paths from new php setup php to existing database? Which method would be quicker – easier? I don’t mind editing paths, but if there are hundreds to do, then …

Happy to be a Zen Cart Monthly Donor! :)

18 Mar 2009, 6:39 PM
#2
misty avatar

misty

Inactive

Join Date:
Apr 2004
Location:
UK
Posts:
5,752
Plugin Contributions:
1

Re: Running copy of a ZC store on local machine...

install a new store on the local machine from scratch, and then import the database into the newly created store?
Correct...

Dezina ZenCart Templates
Please do not PM for support queries..Post in forums..help others

18 Mar 2009, 7:37 PM
#3
nadsab avatar

nadsab

Totally Zenned

Join Date:
Sep 2004
Posts:
496
Plugin Contributions:
0

Re: Running copy of a ZC store on local machine...

OK thanks misty,

If my MySQL server on my local Windows XP machine, and/or my version of php on my local XP machine, are both different versions from MySQL and php running on the linux server that hosts the ZC store I am editing and eventually uploading changes to, and if I edit the database files using the locally installed phpMyAdmin, will it cause any compatibility problems or could it cause the store to crash, once I upload both the edits/changes to the database and any changed php code?

Happy to be a Zen Cart Monthly Donor! :)

18 Mar 2009, 8:51 PM
#4
stevesh avatar

stevesh

Black Belt

Join Date:
Feb 2005
Location:
Lansing, Michigan USA
Posts:
19,793
Plugin Contributions:
2

Re: Running copy of a ZC store on local machine...

I have to question why you're going to all this trouble.

Why not just set up your test site up in a subdirectory of your remote site?

Local installations make no sense to me.

19 Mar 2009, 2:08 AM
#5
nadsab avatar

nadsab

Totally Zenned

Join Date:
Sep 2004
Posts:
496
Plugin Contributions:
0

Re: Running copy of a ZC store on local machine...

Hi stevesh,

Hey I love your avatar, I grew up with Kukla, fran and ollie brings back memories.

Actually I am partly tinkering, but what I am doing, is using Dreamweaver 4 to edit ONLY the stye sheets, not the php code and not the database. I downloaded and installed an entire live store and database to my local pc and linked the database into the store, and can now view the entire store on local pc and even log into admin with the original password I set up on the live server. It’s all running on WAMP on local machine. I can even place an order locally and the store on local pc actually emails me a receipt. It all works too, just finally got it set up.

Neat thing about Dreamweaver, is that I can make changes to the style sheets using their css editor, and view the changes on any page in the store. The site manager in Dreamweaver allows me to import both the php code and the entire store database and link it all together, so I can open any product page in Dreamweaver and see how it looks after the css stylesheets edits. If I want, I can make changes in local admin for formatting, and see how it all looks in either live view or any browser, and if it looks OK, I can just upload the revised style sheets only, to the store, and then go ahead and make the same changes in admin I made on local machine to admin in the live store. That's the plan anyway, I'll know how it works out for me in a few days after I get to work.

I could make changes to the database locally via local phpMyAdmin install and upload them, but I don’t think I want to do that, don’t want to take any chances with the live database – so I’ll handle the database the old fashioned – safe way with either editing the database with Navicat or live ZC admin. At some point I may install phpMyAdmin on live server but Navicat seems to work great for me so far.

It's all pretty cool. just got it working tonight. I’m amazed I actually got it all working, I’ve been wanting to try this out for years, I think it will help me learn the style sheets, template overrides and store a bit better too.

I'm really curious if anyone reading this has ever tried this? If so I'd be interested to hear how it worked out for you.

Happy to be a Zen Cart Monthly Donor! :)

22 Mar 2009, 4:22 PM
#6
khalilm avatar

khalilm

New Zenner

Join Date:
Jan 2009
Posts:
11
Plugin Contributions:
0

Re: Running copy of a ZC store on local machine...

Hi nadsab,

I am doing exactly what you are doing minus the Dreamweaver part.

The advantage of running is local is that I dont have to spend the time to upload a changed file to the server before seeing it's affects.

In addition, I also use source control software which allows me to experiment with the present code and once I am happy then upload it to the live site. This not only allows me to test it but also have a back up of all the code just in case something happens or if I want to revert back.

The disadvantage is if you want to make changes to the admin or database is you have to do it in two spots. Or depending upon the changes, do it in one and up/download to the other. But whether you have a test site on your server, you really have to do that anyway.

In this case how you experiment with your site is really a matter of choice, stevesh's suggestion is just as valid.

So to answer your question, this has worked out great for me as it also gave me more insight into LINUX end of hosting as I am running XAMPP under Windows so I can experiment with the php.ini files etc for debug output, logging, SSL etc.

Khalil