localhost not working

Problems with the Windows version of XAMPP, questions, comments, and anything related.

localhost not working

Postby JTT2 » 03. May 2012 15:16

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!
JTT2
 
Posts: 3
Joined: 03. May 2012 15:10
Operating System: WIN XP service Pack 3

Re: localhost not working

Postby JonB » 03. May 2012 21:34

Could you give a sample URL you are currently using???

Good Luck
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7

Re: localhost not working

Postby JTT2 » 04. May 2012 14:53

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
JTT2
 
Posts: 3
Joined: 03. May 2012 15:10
Operating System: WIN XP service Pack 3

Re: localhost not working

Postby Altrea » 04. May 2012 15:42

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?
We don't provide any support via personal channels like PM, email, Skype, TeamViewer!

It's like porn for programmers 8)
User avatar
Altrea
AF Moderator
 
Posts: 8299
Joined: 17. August 2009 13:05
XAMPP version: several
Operating System: Windows 10 Pro x64

Re: localhost not working

Postby JTT2 » 04. May 2012 15:53

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!
JTT2
 
Posts: 3
Joined: 03. May 2012 15:10
Operating System: WIN XP service Pack 3

Re: localhost not working

Postby JonB » 04. May 2012 18:48

AHA ! - Good it was exactly as I thought - a malformed URL...

Good Luck with your project.
8)
User avatar
JonB
AF Moderator
 
Posts: 3210
Joined: 12. April 2010 16:41
Location: Land of the Blazing Sun
Operating System: Windows XP/7 - Fedora 15 1.7.7


Return to XAMPP for Windows

Who is online

Users browsing this forum: No registered users and 33 guests