0

My first ever post on stackoverflow.com! A great site, and I hope my post will contribute to the benefit of others.

The situation: I have been entrusted to renovate a really small, existing, php-driven web site.

So, I started to set up my environment:

  • Dreamweaver was installed.
  • I FTP'd the files to my computer from the remote server.
  • I choose Apache and MySQL via the XAMPP package to set up a local host on my computer (PC, Windows XP), installed XAMPP and set the passwords that are left out by default.
  • I made sure that both Apache and MySQL was up and running.
  • I set the parameters for the local info, remote info and testing server in Dreamweaver, (this took some time).

All's well so far.

But the site would not work properly when previewed locally in a browser. The live version ran just fine.

The problem: The first page of the site would launch with no connection to the css stylesheet or the images folder and when trying the generated links, they would hit the XAMPP redirect in the root folder and the XAMPP orange page would display.

So, how to fix this?

Again, thanx for a great site! /Vaquera

Vaquera
  • 11
  • 1
  • 3
  • 1
    I believe there is no question. Since he is new, he posted this to give some helpful information/solution. He will be useful to stackoverflow when he got the idea :) Welcome to StackOverflow a.k.a "SO" sometimes Vaquera. In this useful site, we, developers post the problems we have (with the code and research) and the other helpful developers like yourselves share their knowledge and experience to fix the problem. Welcome again! – Mustafa Jul 12 '12 at 11:39
  • 1
    @ Damien -Sorry! I did not intend to confuse! Yes, no question indeed, I tried to "answer myself" to mark this as answered but since I am so new, I must wait at least 8 h before I can do that, which I will as soon as possible. I should have thought of making a comment on that! Thanks for commenting! – Vaquera Jul 12 '12 at 11:47
  • 1
    @ Mustafa -Thanks for the warm welcome! :-) and yes, I **am** really green here. The thing is, I serched SO for a solution to my problem, but found only the reverse problems (working locally, but not on remote) so I thought maybe someone else might encounter this and be helped by this post, hence my post. Thanks for commenting! – Vaquera Jul 12 '12 at 11:51
  • 1
    Yeah but SO's not a blog. Post your solution as an answer and accept it, so to give meaning to the format – Damien Pirsy Jul 12 '12 at 12:08
  • And btw, i requested an edit about your post. you have tagged "xampp" and your directories point "xampp" but sometimes you mentioned WAMPP (might be confusing with WAMP Server?). – Mustafa Jul 12 '12 at 12:14
  • @ Damien: Again, sorry for not honouring the format in my fist post. It was never my intention to make anything wrong. I do apologise for the confusion it created. As the stipulated 8h now have passed, I have edited the post, I hope in accordance to the customary format. Thanks for commenting! – Vaquera Jul 13 '12 at 06:53
  • @ Mustafa: Thanks! Typos... Of course it was supposed to be XAMPP! Thanks for commenting! – Vaquera Jul 13 '12 at 06:56

1 Answers1

1

The solution ...was to edit the DocumentRoot setting in the xampp/apache/conf/httpd.conf file.

The thing was that I had placed the folder where the dynamic contents of my test site was as a subfolder to XAMPPs default webroot folder htdocs: htdocs/MySampleSite

When I edited the DocumentRoot setting in the xampp/apache/conf/httpd.conf from the default folder DocumentRoot "C:/xampp/htdocs" to the actual folder DocumentRoot "C:/xampp/htdocs/MySampleSite" all the problems resolved themselves.

Do remember that you need to change this on two locations in httpd.conf! Apart from the above mentioned, you also have to change the default to

Well, in hindsight, I guess it's rather trivial, but it took some time in finding the right place, so I hope this might help others.

Again, thanx for a great site! Vaquera

Vaquera
  • 11
  • 1
  • 3
  • Hehehe, aaand I cannot accept my own answer until tomorrow! So, it'll just have to wait! But this is how the problem got solved for me. – Vaquera Jul 13 '12 at 06:55