Turn on PHP errors

Showing errors on your Reclaim server

Sometimes you'll run a program on Reclaim, and get a blank page. There might be errors in your code, but PHP doesn't give you any error messages. Makes it hard to work out what's wrong.

What's the haps?

Sometimes Reclaim configures PHP to suppress error messages. That's a Bad Thing when you're learning.

You can change it. Start up ye olde cPanel. Run the MultiPHP INI Editor. php.ini is a file that tells the server how it should run PHP. cPanel makes it easy to change ini files.

Each subdomain has its own php.ini file. Choose the one you want to change:

Which ini file?

You should set error reporting for your exercises subdomain, at the very least:

exercises

Turn on error reporting:

Errors on

Don't forget to Apply.

Showing errors on XAMPP

Same problem. XAMPP might be set up to not show PHP errors. You want it to, so you can find bugs easily.

Click on the Apache config button in the control panel:

Configure PHP

Select PHP. PHP settings are stored in the file php.ini.

An editor like Notepad will open, with the php.ini file.

Find the text display_errors. If the line begins with a ;, keep searching. ; means comment.

You'll find a line like this:

display_errors=Off

Change Off to On. Save the file. That's it!

If you have a Mac, there might not be a configure Apache button. Google the procedure.