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

Why do I get a 500 HTTP error when I try to preview this workspace?

https://w.trhou.se/nxeqnuoot2

For some reason I keep on getting a 500 error when trying to preview the project in the browser. I have no idea why. I believe there is nothing broken in the code.

Any help would be great, thanks.

1 Answer

In your functions.php file you are missing an end quote on line 17:

 . ' JOIN projects ON tasks.project_id = projects.project_id';  

and end quote after "Error!: on line 35

echo "Error!:" . $e->getMessage() . "<br>";

When correct you can see the difference in the syntax coloring.

Thanks, I fixed these but I still get a 500 error. Also I think if those typos were the reason for the error I would just see an error message in the page rather than an HTTP error.