Page 1 of 1

localhost not working

PostPosted: 03. May 2012 15:16
by JTT2
Hi,
I have installed XAMPP (very nice by the way) and all seems to be operating and running. Status page for XAMPP says all is good, but I cannot get localhost to render anything to the page. It always give me a 404 error.

Both html pages and PHP pages have the same result.

I have the files stored in the xampp/htdocs, I believe that is where they should go.

I have tried localhost:80 (which is in the config file) and its till errro 404.

What setting am I missing to test webpages and run PHP scripts as my development machine?

Thanks!

Re: localhost not working

PostPosted: 03. May 2012 21:34
by JonB
Could you give a sample URL you are currently using???

Good Luck
8)

Re: localhost not working

PostPosted: 04. May 2012 14:53
by JTT2
Actually, I have discovered that, of course, it was a dumb user error. Or in this case a dumb developer error.

I now have it running...thanks for the reply and thanks again for setting up such an easy install as XAMPP is!!!!

Dank

Re: localhost not working

PostPosted: 04. May 2012 15:42
by Altrea
JTT2 wrote:of course, it was a dumb user error. Or in this case a dumb developer error.

Do you want to specify the solution and share it with us?

Re: localhost not working

PostPosted: 04. May 2012 15:53
by JTT2
oh, sure, no problem.

I added on the xampp folder and/or the htdocs folder as part of the URL.

localhost/xampp/htdocs/index.html

And of course it did not work...because the file was not in that folder, but I thought that I had to add on the 'htdocs' part.

I have used IIS for many years and develop mostly in .NET so I am just getting used to the settings for apache.

localhost/index.html and localhost/index.php work fine...of course.

I have also added on a new folder in the htdocs 'TestPHP' and this URL works fine:

localhost/TestPHP/index.php

It ran the PHP script and printed to the screen "Hello World" as the PHP code indicated. I did not realize that it (apache) would run automatically from the htdocs folder...now I know...

Thanks again!

Re: localhost not working

PostPosted: 04. May 2012 18:48
by JonB
AHA ! - Good it was exactly as I thought - a malformed URL...

Good Luck with your project.
8)