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

Can seem to run PHP on my computer

I am running the PHP lesson with Randy, and have downloaded XAMP for windows 7, the control panel is working but i can seem to run .php files.

Each time i try to open a .php file, a screen comes up for like a second and goes off. I cant seem to continue with my PHP classes since I can run the file. Everything else seems ok.

4 Answers

Have you turned on XAMPP? you have to turn on the server. Right click the new XAMPP icon in the bottom right hand corner of your screen (near your clock) and you have to open the XAMPP server and turn it on

Try that if you haven't first

Do you also have your files in the "htdocs" folder? You also need to have your browser address as localhost/

@Luke, I presume its turned on because i started it from the control panel and the Apache indicator shows green and an option to stop. The others are off (red) though, MySQL, Filezilla, Mecury and Tomcat.

@Jason, i have the files in the htdocs and the browser address alright

Sorry, I'm not sure what else to suggest. Do you have this resolved yet?

Apache seems to be running for you and that's all you need.

I have a "shirts4mike" subfolder in htdocs where I've placed that project and if i point my browser to "http://localhost/shirts4mike/" I'm able to see the index page of that site.