Show me the errors!

It took me forever to figure out why the hell including a specific class file in one of my PHP scripts was causing the script to output nothing -- besides a blank white page. I finally figured out that PHP must be hiding errors and as soon as I added the following line to the top of my script, the error was obvious (a single character error, no doubt):


ini_set('display_errors', '1');

I was testing on a webhost I had never used before, so I wrongly assumed it was a problem with my code causing the blank output.

Verizon's Ultimate Call Forwarding service allows you to remotely enable/disable call forwarding, as well as change the number to which calls will be forwarded. When you call the automated system to activate call forwarding, there are several other options you can select, such as "Forward after no answer" and "Forward when busy". Those features are extras, for which you need to pay an additional monthly fee. The only feature enabled on account I was configuring is the basic call forwarding, which explicitly forwards all calls. Why then, am I able to select, configure, and enable the other features?

"To enable Forward after no answer, press 1"
"1"
"Please enter the number you wish to forward your calls to"
"617-959-xxxx"
"Please hold while we process your request..."
"Please hold while we process your request..."
"Please hold while we process your request..."
"Forward after no answer has been enabled."

No it hasn't! The damn automated system says its been enabled, when in fact configuring and enabling this feature does absolutely nothing! So much for an intelligent system. It should tell me I don't have that feature enabled, not allow me to configure and enable it.

Write a Comment

Comment

  1. Extremely minor detail: ini_set() needs to be called with only string parameters, so it should be ini_set(‘display_errors’, ‘1’); to turn display on or ini_set(‘display_errors’, ‘0’); to turn them off.

    Totally irrelevant, but I couldn’t help mentioning it.

  2. Ah, my mistake. I copied that line from a website which was describing how to turn errors off when I wrote this post, but I changed it to ini_set('display_errors', true); in my code.

    Simply using true or false seems to work from my end, but you’re right; technically the value should be 1 or 0. 🙂

    Thanks for the correction!