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 Build a Simple PHP Application Getting Started with PHP Your First PHP File

Chaya Felsinger
Chaya Felsinger
1,123 Points

Google Chrome won't connect to Host

Hi, I am getting this error message: Oops! Google Chrome could not connect to localhost . I've installed Apache and created the php file

Any solutions?

7 Answers

Did you start Apache?

Christopher Oh
Christopher Oh
3,507 Points

Double check if your Apache is running. You also need to upload or save the php file in /htdocs

In addition to the above comments from Jeff and Christopher one other thing that could cause that is if you are logged in on say skype reason being skype uses port 80 and so does apache.

Chaya Felsinger
Chaya Felsinger
1,123 Points

Apache is running and I switched the port that apache uses so as not to interfere with skype. However it still won't open.

how are you typing in localhost?? it should look like this http://localhost:yourportnumber Try that

Chaya Felsinger
Chaya Felsinger
1,123 Points

Still not working. I'm ready to give up...

Is there a way I can give access to s/o and they can look at my comp?

Christopher Oh
Christopher Oh
3,507 Points

I would download xampp or whatever you are using to a USB drive and just separately install it in your USB drive. This should allow you to start from a white black sheet. Don't forget to format your USB drive before you use it!! oh and reinstall your chrome or try different browsers.