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

Josh Frazier
Josh Frazier
1,551 Points

PHP: Starting the Project

I'm not sure exactly what I did wrong. It said to rename the file extension from index.html to index.php. When I refreshed the root, it turned to a white screen. The tutorial video shows the .php implemented with CSS active. Any ideas?

Video: http://teamtreehouse.com/library/programming/build-a-simple-php-application/creating-the-menu-and-footer/starting-the-project

There could be multiple issues happening here, would you mind posting the content of the index.html/php file here https://gist.github.com/ and lets go from there?

Josh Frazier
Josh Frazier
1,551 Points

Thanks for replying! I uploaded the code from the index.php

https://gist.github.com/anonymous/6715795

4 Answers

Thanks for posting your code here

Usually when the screen goes white you are looking for a syntax error. You can use a process of elimination to hunt these down in the future. I started by just cutting out large sections of code to narrow it down. In this case the error is in the <head> section of your code.

<title><?php echo "Shirts 4 Mike";?>/title>

Take a look at the closing tag for the title it seems you are missing a open "<" symbol.

Josh Frazier
Josh Frazier
1,551 Points

Thanks Hampton! That worked. I'll continue the adventure!

Need a little more information. Are you trying to run this on a windows or mac? Did your test.php file work properly when you attempted to run it (from the getting started with PHP stage)?

Josh Frazier
Josh Frazier
1,551 Points

I am running on a Mac using MAMP. I use Text Wrangler as my text editor. Everything worked great until the video step where we changed the extension from .html to .php. It's killing me not being able to continue!

Philip Powis
Philip Powis
7,625 Points

I had the same issue. It turned out I was doing <? php echo RATHER THAN: <?php echo. Newbie Mistake on my part!

Josh Frazier
Josh Frazier
1,551 Points

I am running on a Mac using MAMP. I use Text Wrangler as my text editor. Everything worked great until the video step where we changed the extension from .html to .php. It's killing me not being able to continue!

Just to confirm, you're current folder structure looks like this correct? And if you change the .php back to .html the page displays fine correct?

htdocs --css --img favicon.ico index.php test.php

Ugh at markdown, lets try this again:

htdocs
--css
--img
favicon.ico
index.php
test.php
Josh Frazier
Josh Frazier
1,551 Points

Yes...it looks like that and the when I turn it back to the .html extension the page works perfectly.