Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

PHP

http://localhost - Not Working

My localhost server worked perfectly fine just a few hours ago. I was able to access it and see it - but now I can't. Every time I try and load the page Google Chrome says it cannot connect, and I don't know what the problem is. I haven't messed with this computer since earlier in the day.

Everything I try is feeble, and before you ask - no, Skype is not running, because I don't even have it installed.

Solutions?

Thanks!

4 Answers

Are you in the right directory of your project?

Yes, I am.

Hello,

What did you do to your local production environment between the time it worked and the time you tried it in Chrome? Sometimes there are certain things that you do that sometimes shutdown the server. Make sure that all services are running, also.

Cheers!

I haven't done anything to it at all. :/ I heard something that the server might be shutdown. If the server does happen to be shutdown, how would I go about getting it back up?

Larry,

Depending on what local web server you are using (WampServer, XAMP, etc), you can simply click on the server's icon in the taskbar and it should allow you to either go to your web server's control panel that'll show you all of the services available and either a green light for on or a red light for off, or show you all of the services on the menu that you can see if any services are off.

Also, is the browser saying cannot find localhost or just simply giving you a blank screen? If it's just a blank screen, you may have an error in your code that your server isn't displaying, just simply showing you a blank page.

Cheers!

It turns out it was just a program running. I opened Task Manager, shut a few things out, refreshed my localhost and the page was there. Thanks for the help!

Hmm. It started working again. Apparently it was a program running, because I shut out a few things in Task Manager, refreshed my localhost and voila. There's the page. Thanks for the help!

There are many programs that will hijack port 80, one of which is Skype. If you have Skype make sure you unchecked the use of port 80 and 443 in the advanced -> connections tab.