Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

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,693 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?