I Keep getting HTTP 500. How do I effectively debug my app? |
[eluser]djeetee[/eluser]
ok. let's build a debugger!!! great idea! but wait..... hope you're not thinking about writing it in PHP because we don't have a debugger for that ;-)
[eluser]John_Betong[/eluser]
I was intrigued by your problems and cut and paste your code into a controller. The Browser displayed this screen: http://www.graabr.com/l1V0ps/ I run Win7, Php 5.35 and Wamp 2.0. I played about with the error_reporting and display errors and the same message appeared. Code: error_reporting(-1);
[eluser]zechdc[/eluser]
Not sure I follow. The code above is only part of a view in my application. What is your question? Are you just trying to figure out why you got that error?
[eluser]John_Betong[/eluser]
[quote author="zechdc" date="1298585941"]Not sure I follow. The code above is only part of a view in my application. What is your question? Are you just trying to figure out why you got that error? [/quote] Your original post stated that due to a syntax error you were getting a Http://500 response code. I inserted the script and got a very informative error message. I should imagine that MAMP has similar features to WAMP and so maybe investigate how to setup your http://localhost/ so it produces warnings an errors.
[eluser]zechdc[/eluser]
Thank you for the advice. It turns out I had to turn on display errors in my php.ini configuration. Full solution description: <a href="http://ellislab.com/forums/viewthread/181022/#857208">http://ellislab.com/forums/viewthread/181022/#857208</a>
[eluser]John_Betong[/eluser]
It is not necessary to set display errors in the php.ini file they can be toggled using this code in your script Code: error_reporting(-1); As mentioned in the User Guide it is best to switch errors off to prevent Joe Public from seeing your errors, etc
[eluser]zechdc[/eluser]
Ahh... I see what your saying now. Thanks for the advice. I will update my solution post to reflect your advice. |
Welcome Guest, Not a member yet? Register Sign In |