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 Integrating PHP with Databases Databases and PHP Getting to Know the Project

Robert Beviss-Challinor
Robert Beviss-Challinor
952 Points

How to get the local MySQL and PHP environment working?!

I installed XAMPP (windows), but if I now pull the index.php file into Chrome from explorer, the page does not load. The database was imported fine through localhost/phpmyadmin. It seems like there is something wrong with the PHP environment, even though I have Apache and MySQL both running in XAMPP. I'm a bit of a noob but would like to get my own workspace going for future local dev work...

What am I missing?

Simon Coates
Simon Coates
28,694 Points

are you accessing the file via http://localhost or via file (the url would start with file:///)? You said you pulled it in via explorer. PHP will only execute if you access the .php file through http://. I'd assume that being able to access phpmyadmin means that the server is executing and the you don't have any port weirdness (my installation of xampp doesn't play nice with skype). DId you put the .php file in the right directory?