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 Video Install Xampp on Windows 7

So when Randy tells you to rename the file test.php I can get that far as well as when he says type in "Shirts 4 Mike" I do that, but when he says no go to your localhost and refresh, mine says error or forbidden. I would greatly appreciate someone's help as soon as possible!!!

Sincerely,
Courtney :D

Hi Courtney,

Are you saying that you were able to view a file through localhost before these steps but now you can't?

What is the url that you have in your address bar?

Um... I don't know to be honest.

The URL is http://localhost is all it says in the address bar.

Ok, so it sounds like this may be the first time you're trying to view a file through localhost.

Can you link to the video you're on right now?

Did you successfully install xampp?

Do you have the xampp control panel open and have you made sure that you have the apache server started?

There should be a "start" button to the right of apache which will start it for you. localhost isn't going to work until that's running.

Also, do you have your "test.php" file in the "htdocs" folder?

Yes, this is the first time I've used this.

Video: https://teamtreehouse.com/library/build-a-simple-php-application/getting-started-with-php/install-php-on-windows-7

I am pretty sure that I installed xampp fully.

I clicked the start button for apache yes. However in the video when he says to uncheck a certain box about hidden things, I didn't know how to get to that, and I am not using the same typing he is using, I am using notepad on my computer... If that is a problem, please let me know.

Yes I have the test.php in the htdocs folder. :)

In the video, Randy has you click on the "admin" button for apache around 2:20

Did that work for you?

What happens when you try "localhost/test.php" in your address bar? (without the quotes)

Notepad will get the job done but you should make your life easier by switching to a better text editor.

Randy is using sublime text and there's a link to it below the video you're on in the "Teacher's Notes" tab. You don't have to use that one but it's fairly popular and if you're pretty new to all this it might be easier to follow Randy if you're using the same thing.

There's also a "Questions" tab below the video and there's currently 15 questions linked to this video. You could take a look at any that seem to be related to your problem.

I am very confused about all of this, so I am just going to uninstall Xampp and reinstall it and start over.

When I put that into the address bar it says error and it asks me if I meant other things like localhost.org or .net stuff like that, I think it will be better, like you said, if I just follow Randy step by step. Thank you for your help tonight Jason, I appreciate it.

Sorry I couldn't be of more help. I hope it works out for you the 2nd time around.

Don't blame yourself sweetie. You tried, that's what matters.

Okay, I now have everything situated to where I can follow Randy through every step, however now, when I click on test.php while in localhost it opens and shows nothing when it is supposed to show "Shirts 4 Mike"

Appreciate some help yet again, Courtney :)

Nevermind, I fixed it myself, I saved it in the wrong place.

1 Answer

it asks me if I meant other things like localhost.org or .net stuff

Try adding explicitly adding the http at the beginning - http://localhost or http://localhost/test.php