Zen Cart Logo
Forums / Installing on a Windows Server / Stuck install on local site - part 2

Stuck install on local site - part 2

Views: 4,218

Results 1 to 20 of 20
27 Jul 2012, 9:39 PM
#1
iceni11 avatar

iceni11

New Zenner

Join Date:
Mar 2012
Posts:
33
Plugin Contributions:
0

Stuck install on local site - part 2

Prior discussion here: http://www.zen-cart.com/showthread.php?198259-Stuck-installing-local-site

OK, I have followed instructions from various sources to upload a local copy of my existing website, and managed to successfully upload the zencart (green template) to my local server. I am now trying to follow the instructions to upload my existing website, but I'm not getting anywhere. I am using Xampp.

These are the steps I have taken to get my live website over the zencart template...

  1. I copied the includes/configure.php and admin/includes/configure.php files from the zencart files which were in the C:/xampp/htdocs/mystore and stored them elsewhere temporarily.

  2. Using Filezilla, I copied all the files from my live website's public_html file and transferred them into c:/xampp/htdocs/mystore.

  3. I went back to the temporarily stored includes/configure.php and admin/includes/configure.php files from number 1) above, and moved them back to override the same named files that were my existing live website.

  4. I created a new local database in phpmyadmin, and exported the database from my existing website and imported into the local database.

Now I am at a loss as to what to do. I have seen posts which advise that I need to make changes to both of the configure.php files but I cannot access these from the url (http://localhost/mystore/includes/configure.php. I am getting an Access Forbidden error 403. Once I can access these, what changes do I need to make??

Also, I cannot find the fix_cache_key.php file to complete the steps for that.

Thx

27 Jul 2012, 11:46 PM
#2
drbyte avatar

drbyte

Sensei

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

Re: Stuck install on local site - part 2

iceni11:

Now I am at a loss as to what to do.Um ... I'm at a loss as to what you think you need to do.

Are you asking us how to display your localhost store in your browser? Answer: http://localhost/mystore/index.php

Are you asking something else?

iceni11:

I have seen posts which advise that I need to make changes to both of the configure.php filesWhy are you thinking you need to change those? What search took you to those posts in the first place?
iceni11:

but I cannot access these from the url (http://localhost/mystore/includes/configure.php. I am getting an Access Forbidden error 403.Not surprising. Nobody should ever be able to access those files via a URL. You edit PHP files using a text editor like NotePad++ or CrimsonEditor
You said yourself that you put your files into the c:/xampp/htdocs/mystore folder. So, to edit your storefront configure.php file, you'll use Notepad++ to access c:/xampp/htdocs/mystore/includes/configure.php
iceni11:

Once I can access these, what changes do I need to make??Again, that depends on why you're even trying to edit that file in the first place.
You already said that the configure.php files you now have are the ones that zc_install updated for you, because you put them back after copying your live site's files into your htdocs/mystore folder. So, if you have indeed put back the configure.php files generated for your xampp setup, then there should be no need to edit the configure.php files at all.

So that brings us back to: You said you're "at a loss as to what to do". But you haven't explained what end result you're looking for vs what result you're getting.

28 Jul 2012, 12:53 PM
#3
picandnix avatar

picandnix

Totally Zenned

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

Re: Stuck install on local site - part 2

Ok. You need to add the xampp database details to your 2 configure files. Did you setup a password for your xampp install? If not then don't add a password to your configure files (of course this only applies for your PC version not your www version!!). Next, did you add a username? Or is it 'root'?
You could always paste the contents of your xampp, I repeat your XAMPP configure files. (providing you didn't use the same password as you did on your www version. And the user details of your XAMPP phpmyadmin setup (again only if those details are different to your www details).

28 Jul 2012, 12:56 PM
#4
picandnix avatar

picandnix

Totally Zenned

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

Re: Stuck install on local site - part 2

Oh and as for the permissions issue, right click the configure.php file, click properties and uncheck the 'read only' option before you try to edit the file.

28 Jul 2012, 5:06 PM
#5
drbyte avatar

drbyte

Sensei

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

Re: Stuck install on local site - part 2

The 2 configure.php files for Zen Cart will get the right database settings if you run zc_install and give it the database credentials when asked. Running zc_install to do an actual fresh new install of Zen Cart is something you need to do before the 4 steps you mentioned in your first post above.

28 Jul 2012, 5:31 PM
#6
picandnix avatar

picandnix

Totally Zenned

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

Re: Stuck install on local site - part 2

DrByte:

The 2 configure.php files for Zen Cart will get the right database settings if you run zc_install and give it the database credentials when asked. Running zc_install to do an actual fresh new install of Zen Cart is something you need to do before the 4 steps you mentioned in your first post above.

Hi boss. Is she not trying to install her existing site to her PC? Therefore would she not need to have her live DB installed to her xampp phpmyadmin and then her local configure files pointing to her local DB?

28 Jul 2012, 5:50 PM
#7
drbyte avatar

drbyte

Sensei

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

Re: Stuck install on local site - part 2

  1. Install Zen Cart fresh on the local PC (include demo products for simplicity), and test that it works, both storefront and admin. Best to be sure to use the same version of Zen Cart as is used on the live server.
  2. Preserve the 2 configure.php files for step 4 below, since step 3 is gonna replace them.
  3. Copy the files from the live site, replacing ALL the Zen Cart files on the PC side
  4. Copy the 2 preserved configure.php files overtop of the ones put there by step 3
  5. Import the database
  6. Run fix-cache-key utility if necessary.

It's all the same as this article here, which explains it in much more detail: http://www.zen-cart.com/content.php?142-i-want-to-move-my-zen-cart-installation-to-another-host-or-a-different-server

28 Jul 2012, 6:04 PM
#8
picandnix avatar

picandnix

Totally Zenned

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

Re: Stuck install on local site - part 2

Ah I'm with you now, I'll keep my beak out ;-) didn't realise she was installing default first before her current live site.

28 Jul 2012, 6:35 PM
#9
drbyte avatar

drbyte

Sensei

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

Re: Stuck install on local site - part 2

No problem chiming in! I'm not asking you to back out at all! Other perspectives help to ensure things aren't missed. I could be missing something too ;)

28 Jul 2012, 7:11 PM
#10
iceni11 avatar

iceni11

New Zenner

Join Date:
Mar 2012
Posts:
33
Plugin Contributions:
0

Re: Stuck install on local site - part 2

Hi again

I am trying to transfer a copy of my existing live website onto my local PC with Xampp.

I have now downloaded Notepad, and am following the instructions below to run the fixed cache key facility.

I have followed all the instructions, but I am having trouble doing the http://www.zen-cart.com/downloads.php?do=file&id=8

Number 2 advises "* 2. Copy this file to the folder where "index.php" exists for your Zen Cart site".... but which folder do I put this in exactly, as when I do a search my entire store folder, there are several files named index.php?

Currently, when I run my localhost site in the browser, I am seeing this page.
Attachment 10891

28 Jul 2012, 7:36 PM
#11
drbyte avatar

drbyte

Sensei

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

Re: Stuck install on local site - part 2

  1. The fix_cache_key.php file needs to be copied into the main (or "root" or "top" or whatever you wanna call it) folder where your Zen Cart files are located. That's where the main index.php file exists. You'll also find some other files there like ipn_main_handler.php, nddbc.html, etc. In your case I believe you called the folder "mystore".

  2. The message seen in the picture you shared means that your database credentials (the DB_XXXXXX settings) in your configure.php files are incorrect, or that the MySQL service isn't running on your server (in this case "server" means your XAMPP PC).

29 Jul 2012, 12:01 AM
#12
iceni11 avatar

iceni11

New Zenner

Join Date:
Mar 2012
Posts:
33
Plugin Contributions:
0

Re: Stuck install on local site - part 2

OK, thanks. I followed the above and believe I am almost there.

When I go to http://localhost/mystore/ I still get the green Zencart store screen.

In my Xampp control panel, I am getting the following message relating to mySQL

Possible problem detected
port 3306 in use by "c:\xampp\xampp-control.exe"!

What do I need to do to fix this?

29 Jul 2012, 12:03 AM
#13
drbyte avatar

drbyte

Sensei

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

Re: Stuck install on local site - part 2

iceni11:

When I go to http://localhost/mystore/ I still get the green Zencart store screen.What were you expecting?
iceni11:

In my Xampp control panel, I am getting the following message relating to mySQL

Possible problem detected
port 3306 in use by "c:\xampp\xampp-control.exe"!

What do I need to do to fix this?
You'll want to visit the XAMPP support site about errors encountered while using XAMPP. But if you're seeing a working Zen Cart and not a database error message then that port 3306 error can probably be safely ignored for the time being.

29 Jul 2012, 5:06 PM
#14
iceni11 avatar

iceni11

New Zenner

Join Date:
Mar 2012
Posts:
33
Plugin Contributions:
0

Re: Stuck install on local site - part 2

[QUOTE=DrByte;1141125]What were you expecting?

I was expecting to see a version of my live website rather than the zencart green template.

29 Jul 2012, 5:20 PM
#15
iceni11 avatar

iceni11

New Zenner

Join Date:
Mar 2012
Posts:
33
Plugin Contributions:
0

Re: Stuck install on local site - part 2

OK, I went into Admin and changed the template from the classic green to my custom template, however it is now giving me a mix of the two templates.

29 Jul 2012, 5:26 PM
#16
picandnix avatar

picandnix

Totally Zenned

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

Re: Stuck install on local site - part 2

You need to replace your xampp local files with those of your LIVE store files, except for the 2 configure files add previously discussed.
Then you need to go to xampp phpmyadmin and import a copy of your live database into xampp.

30 Jul 2012, 12:50 AM
#17
iceni11 avatar

iceni11

New Zenner

Join Date:
Mar 2012
Posts:
33
Plugin Contributions:
0

Re: Stuck install on local site - part 2

Yes I followed the instructions but I am still getting a partial mix from my website and a partial mix of the default green Zencart template.

See the attached screenshots. Screenshots 1 & 2 are from my existing live website, and screenshots 3 & 4 are from the localhost (the mixed one).

Attachment 10900Attachment 10901

What do I need to do to rectify the localhost?

Attachment 10898Attachment 10899

30 Jul 2012, 4:35 AM
#18
drbyte avatar

drbyte

Sensei

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

Re: Stuck install on local site - part 2

On your live site, in your configure.php file, there is a DB_PREFIX definition. What is it?
And what did you use on your localhost install when it asked you for a DB Prefix?

You need to use the same DB_PREFIX on your localhost as you use on your live host. Otherwise your localhost will show data from different tables than what you import from your live site.

1 Aug 2012, 11:53 PM
#19
iceni11 avatar

iceni11

New Zenner

Join Date:
Mar 2012
Posts:
33
Plugin Contributions:
0

Re: Stuck install on local site - part 2

OK thanks - 2 more questions..

  1. Do I need to change the DB_PREFIX on both the configure.php and admin/configure.php files?

  2. Do the admin pages for the local and live website work independently? I can access the localhost admin page, but now cannot log into the admin page for my 'live' website. For the live website page, I am entering www.mywebsite/admin, and I'm getting an HTTP 404 error.

2 Aug 2012, 8:01 PM
#20
drbyte avatar

drbyte

Sensei

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

Re: Stuck install on local site - part 2

  1. Yes. Both must use the same DB_XXXXXXX settings.

  2. yes, the localhost site and the live site are independent of each other.