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
H Wishnia
12,253 PointsWorkspaces won't preview my work that I've never had a problem previewing. gives http 500 error. started 4 days ago.
I took summer off and have been back getting refamiliar with php. I had no problems previewing my work ever. Nothing on my end has changed. I left laptop exactly how it was when I was learning. I started back 4 days ago and went to check my saved workspaces for php and gives http 500 error. Didn't really think to much of it and just continued the watching videos and adding on to my workspace. I see the workspace where I add the code just fine. I tried the next day and same error, so I went and checked other saved workspaces and same error. All those other saved come up just fine and I can add code to them just not preview. I looked up http 500 error and It said to clear cookies and cashe and I did that with no success. I am at a loss as to how I can continue. Even though I can add code, It doesn't help that I can't view it. I hate to have to go to workspaces and save to notepad and work through chrome but at this point that is all I can think of to do.
5 Answers
Simon Duchaine
14,441 PointsMaybe you should contact Treehouse Team and see if they can help you with that. Maybe there's a problem with your workspaces as it is some kind of personal webhost.
Nathan Williams
Python Web Development Techdegree Student 6,851 PointsA 500 error generally means you have an error in your PHP code; If you could share a snapshot of your workspace, I'd be happy to look and see if I can find anything!
H Wishnia
12,253 PointsI would show you code but that isn't the issue. Its not just php, Its every workspace I've ever created in the last year. As I stated previously I have been taking the courses for a year and never an issue and went back many times to all those workspaces to add on etc and could always view my work. But all of a sudden getting the 500 error and can't view any of the about 50 workspaces I've created.
Nathan Williams
Python Web Development Techdegree Student 6,851 PointsI took a look at your PHP workspace, and the problem is on line 6 where you're using a hyphen in a variable name, which is getting interpreted as the subtraction operator and causing a syntax error. You can check for this type of error by cat'ing the contents of /var/log/httpd-workspaces/error_log. to see the PHP error log.
H Wishnia
12,253 PointsThanks for that. When I came in an no response from support I checked my php workspace and still nothing so I went to check my other workspaces again and crazy enough everything allows me to view without the 500 error coming up. So I am to assume you are correct with your above statement. I am going to go back to php and correct line 6 and see if it works. I don't know what was up that all last week all my workspaces gave me the 500 error message but all seems to be working great again. off to go fix line 6.
H Wishnia
12,253 PointsYay, Thank you so much Nathan. It fixed it and I can get back to the beginning of php. I just kept watching the videos and gave up on adding to the workspace.
Nathan Williams
Python Web Development Techdegree Student 6,851 PointsGlad to hear it's working again!
H Wishnia
12,253 PointsH Wishnia
12,253 PointsI have put into support so hoping to hear back from them. I was just hoping that maybe this has happened to someone else. It just seems odd that I had no problems for 9 months straight and now can't preview any of my work without that error code. thanks