Zen Cart Logo
Forums / Installing on a Windows Server / Installing for local server

Installing for local server

Locked

Views: 4,196

Results 1 to 18 of 18
This thread is locked. New replies are disabled.
26 Feb 2009, 5:04 PM
#1
buster52 avatar

buster52

New Zenner

Join Date:
Feb 2009
Location:
Carlisle, Cumbria, UK
Posts:
28
Plugin Contributions:
0

Installing for local server

I received my book this morning and I am trying to set up a local store on my pc I have installed xampp and its working the next bit was to open the local.com page wich was fine the next bit is where I am getting stuck I opened notepad as administrator and the opened
C:\WINDOWS\system32\drivers\etc\hosts

the file opens ok and I can save the changes but when I add the lines suggested

127.0.0.1 https://www.example.com # For browser access

127.0.0.1 mail.example.com # For email access

127.0.0.1 example.com # For mercury mail server

I have tried with and without the hash but it does not work with either

127.0.0.1 https://www.example.com # For browser access
127.0.0.1 mail.example.com # For email access
127.0.0.1 example.com # For mercury mail server

this is the file

Copyright (c) 1993-2006 Microsoft Corp.

This is a sample HOSTS file used by Microsoft TCP/IP for Windows.

This file contains the mappings of IP addresses to host names. Each

entry should be kept on an individual line. The IP address should

be placed in the first column followed by the corresponding host name.

The IP address and the host name should be separated by at least one

space.

Additionally, comments (such as these) may be inserted on individual

lines or following the machine name denoted by a '#' symbol.

For example:

102.54.94.97 rhino.acme.com # source server

38.25.63.10 x.acme.com # x client host

localhost name resolution is handle within DNS itself.

127.0.0.1 localhost

::1 localhost

127.0.0.1 https://www.example.com # For browser access

127.0.0.1 mail.example.com # For email access

127.0.0.1 example.com # For mercury mail server

can someone tell me what I am doing wrong
when I try localhost .com without the above it opens the page as suggested

26 Feb 2009, 5:23 PM
#2
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Installing for local server

If you are able to go to: http://localhost and you get the XAMPP landing page then XAMPP is installed fine and you don't need to alter the hosts file. The only time you need to alter the hosts file is when you have another server running on Port 80 and want XAMPP to run on another Port e.g. 8080 or where you want to use domain aliases on your PC e.g. http://localhost/yourdomain.com (this is not necessary to install a local copy of your website on XAMPP).

The next thing to do is to set up a folder called 'zen' inside the xampp/htdocs folder and then drop all of the Zen Cart folders and files inside it (except for the folder containing all those files and sub folders).

Then go to http://localhost/phpmyadmin and create a blank database.

Then go to http://localhost/zen/zc_install and begin installing Zen Cart.

Vger

26 Feb 2009, 7:05 PM
#3
buster52 avatar

buster52

New Zenner

Join Date:
Feb 2009
Location:
Carlisle, Cumbria, UK
Posts:
28
Plugin Contributions:
0

Re: Installing for local server

thanks for replying I dont know how but the above file alteration now works
I unistalled the xampp program and reinstalled it re-edited the file and know it works so for know I will carry on following the book as I am totally green at this so betting sticking with what is in front of me
although I did create the file and data base that you suggested before uninstalling the program and then did not know what to do next.
so I am back to following the book untill I understand a bit more
thanks again for answering

this is the working file

Copyright (c) 1993-2006 Microsoft Corp.

This is a sample HOSTS file used by Microsoft TCP/IP for Windows.

This file contains the mappings of IP addresses to host names. Each

entry should be kept on an individual line. The IP address should

be placed in the first column followed by the corresponding host name.

The IP address and the host name should be separated by at least one

space.

Additionally, comments (such as these) may be inserted on individual

lines or following the machine name denoted by a '#' symbol.

For example:

102.54.94.97 rhino.acme.com # source server

38.25.63.10 x.acme.com # x client host

localhost name resolution is handle within DNS itself.

127.0.0.1 localhost

::1 localhost

127.0.0.1 https://www.example.com # For browser access
127.0.0.1 mail.example.com # For email access
127.0.0.1 example.com # For mercury mail server

26 Feb 2009, 11:15 PM
#4
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Installing for local server

I think what may have happened the first time is that you didn't shut down and reboot the Apache server after making the changes.

Vger

27 Feb 2009, 5:41 PM
#5
buster52 avatar

buster52

New Zenner

Join Date:
Feb 2009
Location:
Carlisle, Cumbria, UK
Posts:
28
Plugin Contributions:
0

Re: Installing for local server

Hi Vger

Yes I think you are right
I have setup the local store and webmail server so now I am getting on quite well still a lot to learn but I am enjoying the process and I am looking forward to having the whole test shop working on our own computer
thanks again for answering it is helping to give me the confidence to try this project My wife is very good at making hand made greetings cards and other things she had 30,000 visitors to her blog last year so we are trying to see if we can sell some online long way to go yet
but I think I can learn enough to get it working now
tom whitfield

2 Mar 2009, 4:17 PM
#6
philip56 avatar

philip56

Zen Follower

Join Date:
Sep 2007
Location:
Herne Bay, Kent, England
Posts:
182
Plugin Contributions:
0

Re: Installing for local server

Hi.

I'm trying to install a copy of my established site on a local server to use as a "test bed". Apache is running successfully on my Windows PC. I naively thought that all I had to do was install a file backup of my live site on the local server, tweak the two configure files and off I would go! However browsing to http://localhost/testsite/ just gives a listing of files and folders in /testsite/. Browsing to a specific page such as shipping gives an error 404 - The requested URL /testsite/zc_install/index.php was not found on this server.

What else do I need to do?

Also where in the structure do I put the database?

Regards

Philip

2 Mar 2009, 4:43 PM
#7
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Installing for local server

You need to go to http://localhost/phpmyadmin and ste up a new blank database, and then use the Import tab to browse to a backup of your online db on your PC and Import it.

Then you need to reset the two configure.php files correctly for your local install, with the correct db name, db user name and password etc.

Vger

2 Mar 2009, 4:51 PM
#8
philip56 avatar

philip56

Zen Follower

Join Date:
Sep 2007
Location:
Herne Bay, Kent, England
Posts:
182
Plugin Contributions:
0

Re: Installing for local server

Thanks Vger. I'm in the process of installing phpmyadmin at the moment.

Am I on the right track with the fileset?

Philip

2 Mar 2009, 5:02 PM
#9
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Installing for local server

If you had installed XAMPP then you would have phpMyAdmin and everything else all set up at one go.

With regard to the fileset - you download a backup of your websites folders and files to a folder on your PC, call that folder 'testsite' if you wish, and then drop that folder into the 'htdocs' or 'webpages' folder which your server install uses as its base directory.

After installing phpMyAdmin you will need to shut down and reboot your PC before the login to phpMyAdmin will work.

Vger

2 Mar 2009, 5:06 PM
#10
philip56 avatar

philip56

Zen Follower

Join Date:
Sep 2007
Location:
Herne Bay, Kent, England
Posts:
182
Plugin Contributions:
0

Re: Installing for local server

Thanks for your help Vger.

Philip

8 Mar 2009, 5:59 PM
#11
philip56 avatar

philip56

Zen Follower

Join Date:
Sep 2007
Location:
Herne Bay, Kent, England
Posts:
182
Plugin Contributions:
0

Re: Installing for local server

I decided to follow Vgers advice and install XAMPP. No problem there. I then installed zcart 1.3.8 on localhost with no problems. However when I install a copy of our own site on localhost (and after making the required changes to the two configure files, I get the following errors:-

Warning: fopen(Q:/xampp/htdocs/zen/cache/zc_cc21d2f64edffccfe06d12dd3327bf64.sql) [function.fopen]: failed to open stream: No such file or directory in Q:\xampp\htdocs\mainwebsite\includes\classes\cache.php on line 113

Warning: fputs(): supplied argument is not a valid stream resource in Q:\xampp\htdocs\mainwebsite\includes\classes\cache.php on line 114

Warning: fclose(): supplied argument is not a valid stream resource in Q:\xampp\htdocs\mainwebsite\includes\classes\cache.php on line 115

Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at Q:\xampp\htdocs\mainwebsite\includes\classes\cache.php:113) in Q:\xampp\htdocs\mainwebsite\includes\functions\sessions.php on line 108

Warning: require(includes/languages/english/email_extras.php) [function.require]: failed to open stream: No such file or directory in Q:\xampp\htdocs\mainwebsite\includes\languages\english.php on line 634

Fatal error: require() [function.require]: Failed opening required 'includes/languages/english/email_extras.php' (include_path='.;Q:\xampp\php\pear') in Q:\xampp\htdocs\mainwebsite\includes\languages\english.php on line 634

Could anyone please offer any advice.

Kind regards

Philip

8 Mar 2009, 6:16 PM
#13
philip56 avatar

philip56

Zen Follower

Join Date:
Sep 2007
Location:
Herne Bay, Kent, England
Posts:
182
Plugin Contributions:
0

Re: Installing for local server

Thanks Vger, I thin it probably will.

What about the last two though -

Warning: require(includes/languages/english/email_extras.php) [function.require]: failed to open stream: No such file or directory in Q:\xampp\htdocs\mainwebsite\includes\languages\english.php on line 634

Fatal error: require() [function.require]: Failed opening required 'includes/languages/english/email_extras.php' (include_path='.;Q:\xampp\php\pear') in Q:\xampp\htdocs\mainwebsite\includes\languages\english.php on line 634

Philip

8 Mar 2009, 11:36 PM
#14
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Installing for local server

Try the fix supplied and that may resolve all outstanding issues. If not, report back.
Vger

9 Mar 2009, 3:04 PM
#15
philip56 avatar

philip56

Zen Follower

Join Date:
Sep 2007
Location:
Herne Bay, Kent, England
Posts:
182
Plugin Contributions:
0

Re: Installing for local server

Vger:

Try the fix supplied and that may resolve all outstanding issues. If not, report back.
Vger

Well, It certainly solved the cache issues - thanks very much. I'm still left with:-

Warning: require(includes/languages/english/email_extras.php) [function.require]: failed to open stream: No such file or directory in Q:\xampp\htdocs\mainwebsite\includes\languages\english.php on line 634

Fatal error: require() [function.require]: Failed opening required 'includes/languages/english/email_extras.php' (include_path='.;Q:\xampp\php\pear') in Q:\xampp\htdocs\mainwebsite\includes\languages\english.php on line 634

I'm not having this problem with a copy of 1.3.8 I've also installed on my PC

Regards

Philip

9 Mar 2009, 3:14 PM
#16
vger avatar

vger

Past Contributor

Join Date:
Nov 2004
Location:
Norfolk, United Kingdom
Posts:
3,189
Plugin Contributions:
0

Re: Installing for local server

Provided that the file listed does exist then it may be that the folder the file is in is not accessible to the server. Check that you have sufficient permissions to be able to access it.

Vger

9 Mar 2009, 3:44 PM
#17
philip56 avatar

philip56

Zen Follower

Join Date:
Sep 2007
Location:
Herne Bay, Kent, England
Posts:
182
Plugin Contributions:
0

Re: Installing for local server

Right, yes it email_extras.php does exist but in the

includes/languages/english/mytemplate/ folder!

Do you why it's not being found?

Philip

9 Mar 2009, 6:03 PM
#18
philip56 avatar

philip56

Zen Follower

Join Date:
Sep 2007
Location:
Herne Bay, Kent, England
Posts:
182
Plugin Contributions:
0

Re: Installing for local server

Problem solved!! It was a database connection problem.

Many thanks for your help Vger.

Kind regards

Philip