Zen Cart Logo
Forums / Installing on a Windows Server / My shopping page is a mess.

My shopping page is a mess.

Views: 3,117

Results 1 to 9 of 9
13 May 2013, 8:24 AM
#1
whogives avatar

whogives

New Zenner

Join Date:
May 2013
Location:
gauteng
Posts:
4
Plugin Contributions:
0

My shopping page is a mess.

Hi .. I have installed ZC onto my pc to run my webpage from a pc I want to use as a desktop server. This is my first installation and the first time doing the installation .. Every thing is working fine if I run ZC direct from the server PC itself. But if I run ZC from one of the other pc's on the same router/hub (internal) the shopping page is all messed up. No photos and no links working .. Even running it directly from the ouside (external) on the domain name or ext-ip address the problem stays the same .. I have install my ZC (zen-cart-v1.5.1-full-fileset-09182012) to dir c:/xammp/htdocs/zen through XAMPP
Please advice ..
ZC Version = v1.5.1 .. no upgrades and installed through the install file via XAMMP.
PHP Version 5.4.7
MySQL Version 127.0.0.1
I do not have a permanent ip or domain address yet but the external ip at this moment is 196.215.74.52 .. That will direct you to 196.215.74.52/zen.
Screenshot in-case the router reset.
Attachment 12491
Thank you

13 May 2013, 1:37 PM
#3
rodg avatar

rodg

Deceased

Join Date:
Jan 2007
Location:
Australia
Posts:
6,263
Plugin Contributions:
4

Re: My shopping page is a mess.

Whogives:

Every thing is working fine if I run ZC direct from the server PC itself. But if I run ZC from one of the other pc's on the same router/hub (internal) the shopping page is all messed up.

This is because you have defined your server as 'localhost', so all links, etc are expected to be found on the users own machine (localhost), rather than where your server is actually/currently located, namely IP address 196.215.74.52

However, even if/when you fix the configuration problem, if you use the routers IP address (as you appear to be doing), you'll still have an issue with the internal clients because they'll be on their own private network (192.168.x.x, 172.16.x.x or 10.x.x.x) and therefore you'll have a routing issue to resolve.

For testing/development on your own LAN, you can enter the servers LAN IP address into the configuration files (and use the same address for testing). This is much the same as you are currently doing, but by using the LAN IP address rather than 'localhost' will actually get it working as expected.

A somewhat better option (in my opinion), is to give the host server a resolvable name (either via DNS or the hosts file) and avoid the future complications that could result from IP address changes.

Cheers
Rod

13 May 2013, 2:15 PM
#4
torvista avatar

torvista

Totally Zenned

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

Re: My shopping page is a mess.

A somewhat better option (in my opinion), is to give the host server a resolvable name (either via DNS or the hosts file) and avoid the future complications that could result from IP address changes.

Yes...much better!

I do this.

  1. have the "server" pc use a fixed ip like 192.168.1.whatever or use a dynamic dns service and do the address-translation in your router, but I think you still will need to to fix the address.

  2. the host pc webserver uses a virtual host configuration so a call to eg. "www.mysite.local" points to the shop files. on the same pc.

  3. You put www.mysite.local in the configure.php files.

  4. in the other pc's hosts file put the redirection entry

192.168.1.whatever www.mysite.local

so it knows where to "go" when you enter the address.

And that should work. No doubt you will have hours of grief to get it to work (I did) but its worth it in the end.

Other methods like localhost or using an alias have problems that sooner or later you will come across and eventually you will implement it using a virtual host.

I wait in anticipation to now get told what I actually should be doing!

14 May 2013, 6:13 AM
#5
whogives avatar

whogives

New Zenner

Join Date:
May 2013
Location:
gauteng
Posts:
4
Plugin Contributions:
0

Re: My shopping page is a mess.

Thank you all..
Problem solved .. Do the server (XAMMP) installation on the server PC self and the ZEN CART installation from a remote (External) pc.
Don't know way but it works .. !!

16 Jul 2013, 3:56 AM
#6
tinderbox avatar

tinderbox

New Zenner

Join Date:
Jun 2013
Location:
Perth Western Australia
Posts:
20
Plugin Contributions:
0

Re: My shopping page is a mess.

Hi All,

I have the same home page screen as Whogives first post but I installed my live site onto my local machine, the admin area all works well and has imported the live store's setting and database correctly but when I click on the online catalogue or navigate to my store using a browser the front page shows up the same as whogives's screen shot. Also if I click on a link on the site I end up here? (http://www.example.com/xampp/) which is the xampp start screen. I have change the settings in the config file under .../StoreName/includes/configure.php & .../StoreName/your_admin_folder/includes/configure.php to point to my local zen cart folders on my local host is there something I have missed?

Regards
Steve

16 Jul 2013, 4:50 AM
#7
drbyte avatar

drbyte

Sensei

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

Re: My shopping page is a mess.

The path combination created by joining HTTP_SERVER and DIR_WS_CATALOG needs to be valid. Your symptoms suggest they're not.

From a fresh install letting zc_install generate your configure.php files, your paths will all be correct. What have you changed in them since first installing Zen Cart on this computer?

16 Jul 2013, 5:31 AM
#8
tinderbox avatar

tinderbox

New Zenner

Join Date:
Jun 2013
Location:
Perth Western Australia
Posts:
20
Plugin Contributions:
0

Re: My shopping page is a mess.

Hi DrByte,

Thanks for the really I really appreciate the help, I have kept a copy of the original files from the fresh zen cart install and copies the config files over to the transferred live store files and now my data base isn't being loaded into the local site but the site itself loads with everything pics, logo ect, but no products from the database? Thanks again.

Steve.

16 Jul 2013, 5:40 AM
#9
tinderbox avatar

tinderbox

New Zenner

Join Date:
Jun 2013
Location:
Perth Western Australia
Posts:
20
Plugin Contributions:
0

Re: My shopping page is a mess.

Hi Dr Byte,

Found what the problem was, the define('DB_PREFIX'...) was left blank in both files, after I put the prefix in all was good again. Thank you for taking the time to help me I appreciate it very much. Take care.

Steve