PHP Designing Interfaces in PHP Introducing Interfaces Autoloading

Eliyah Kohein
Eliyah Kohein
19,276 Points

500 error instead of debug

Am getting 500 errors instead of debugging for this workspace.

Eliyah Kohein
Eliyah Kohein
19,276 Points

Thanks Brandyn

ini_set('display_errors', 1);
error_reporting(E_ALL);

worked great I can see errors in the browser :)

If you like you can post it in the answers section and I will pick it as the best answer. Sorry for the late reply.

2 Answers

Brandyn Lordi
Brandyn Lordi
16,892 Points

You have to enable php error reporting. An easy debug solution is to use view->show console

Then you can run your file and it will output any errors it runs into. e.g, :

treehouse:~/workspace$ php index.php

Edit: To add to my existing comment to help others in the future(got confused, had to start this series over.. no shame!), you can also display errors in the browser with the following snippet:

ini_set('display_errors', 1);
error_reporting(E_ALL);

I put it in my config.php, but it can be set on a per-page basis.

Spenser Hale
Spenser Hale
18,327 Points

Hello Darrell and Brandyn

Darrell, I hope Brandyn helped you find the error you were experiencing. Brandyn, thank you helping assist Darrel and other students.

It would be useful to the community if Darrel does not need any more assistance on this issue, to have an answer selected as best answer so this question is not still listed as unresolved.