Forums / Installing on a Windows Server / No CSS or images for remote connections

No CSS or images for remote connections

Locked

Views: 1,683

Results 1 to 7 of 7
This thread is locked. New replies are disabled.
16 Mar 2009, 9:27 PM
#1
luxifer avatar

luxifer

New Zenner

Join Date:
Mar 2009
Posts:
57
Plugin Contributions:
0

No CSS or images for remote connections

I've searched the FAQs and the forums (and google, and xampp forums...) and haven't found an answer. That being said, I'm quite sure someone has come across this before.
I have XAMPP installed on a windowsXP box and I have a few different folders, one Drupal, one Zencart...
Everything works fine browsing from localhost, but when looking from remote, over the LAN or WAN, I can't see any images or scripting. And the annoying thing is, this is ONLY FOR ZEN CART. My Drupal folder works fine, my XAMPP folder works fine.
I've tried playing with or removing the .htaccess files, I've tried everything and I just can't get this to work.
There must be an easy answer, but I can't :censored: find it.

16 Mar 2009, 9:41 PM
#2
Kim avatar

Kim

Obaa-san

Join Date:
Jun 2003
Location:
West Coast, North America
Posts:
26,684
Plugin Contributions:
0

Re: No CSS or images for remote connections

You aren't trying to run a live site from your local computer are you? That is NOT recommended.

Please do not PM for support issues: a private solution doesn't benefit the community.

Be careful with unsolicited advice via email or PM - Make sure the person you are talking to is a reliable source.

16 Mar 2009, 9:47 PM
#3
luxifer avatar

luxifer

New Zenner

Join Date:
Mar 2009
Posts:
57
Plugin Contributions:
0

Re: No CSS or images for remote connections

not recommended? heh, I'm a Linux guy. I'm terrified of running this on a windows box.
I'm at a client's shop setting this up, and they want to see it before it goes live, so I'm stuck running this off a local computer in his office. There's a robots.txt blocking spiders, and the only WAN contact is through an dyndns.com host forwarding so I can work on it from home.
The only other option is running it from my linux laptop, and that aint happening.

Thanks for your concern, tho :blush:

so, back to the question..

17 Mar 2009, 6:27 PM
#4
luxifer avatar

luxifer

New Zenner

Join Date:
Mar 2009
Posts:
57
Plugin Contributions:
0

Re: No CSS or images for remote connections

OK, I figured out what the problem was. On installation, in the step where you put the location of the site, I used 'localhost' instead of the domain where it could be found '***.dyndns.org'. This caused the pages to be served properly, but the references to images or css files was confused by the 'localhost' setting, unless I was on the computer where it was hosted.
I solved it by installing another zencart and comparing.

So, the lesson here is, if you're going to have it accessible to anyone else, don't reference it as 'localhost' during installation.

And finally, if you did make a site locally and now would like to make it accessible to the world after it was made, how would you fix this? There's prob a php.ini file somewhere that has this info. [looks] yep, it's in /includes/configure.php

hopefully my dumbness will save someone else some time. :clap:

3 Apr 2009, 11:38 PM
#5
burt avatar

burt

New Zenner

Join Date:
Apr 2009
Posts:
9
Plugin Contributions:
0

Re: No CSS or images for remote connections

Luxifer:

... will save someone else some time. :clap:
Thanks, Luxifer. It definitely did. :thumbsup:
I'm just wondering why they set the default value during installation to localhost. Doesn't make a lot sense.

Anyway, changing HTTP_SERVER in ...\includes\configure.php solved the problem. There is another occurrence of localhost next to DB_SERVER. Do I need to change this line, too?

4 Apr 2009, 1:35 AM
#6
drbyte avatar

drbyte

Sensei

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

Re: No CSS or images for remote connections

burt:

I'm just wondering why they set the default value during installation to localhost. Doesn't make a lot sense.The default was taken from the URL you entered into your browser to begin installation. If that's not what you wanted, you could easily have changed it during installation ... or, as you've seen above, change it afterwards.
burt:

There is another occurrence of localhost next to DB_SERVER. Do I need to change this line, too?
Normally, no. Since the database normally does exist on "localhost", it's best to leave it at that address unless you have specific reason to point it elsewhere.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.

4 Apr 2009, 12:47 PM
#7
luxifer avatar

luxifer

New Zenner

Join Date:
Mar 2009
Posts:
57
Plugin Contributions:
0

Re: No CSS or images for remote connections

DrByte:

The default was taken from the URL you entered into your browser to begin installation. If that's not what you wanted, you could easily have changed it during installation ... or, as you've seen above, change it afterwards.
So I guess the lesson there is, maybe it could be clarified a bit during the installation, exactly what should be put there. Since multiple people have had this problem.

DrByte:

Normally, no. Since the database normally does exist on "localhost", it's best to leave it at that address unless you have specific reason to point it elsewhere.
I was about to say that. Herein lies the problem, localhost to most people just means 'the machine that this is on'. So if it works for the database server, why wouldn't it work for the HTTP server? In actuality, on my machine my db is NOT on the same cpu, yet localhost still works for me. Aren't computers weird?
All this to say, maybe a few lines of clarification in the install package might save some people some time.
Glad you got it working, Burt