Jump to content
Larry Ullman's Book Forums

Display_Errors Function Fails (Review & Pursue)


Recommended Posts

Dear Larry,

 

In the Review and Pursue section of chapter 3 of this great book, you have put a question:

 

Under what circumstances will attempts to enable display_errors in a script not succeed?

 

I searched this forum and the book, but I am unable to find the answer. Could you give me the answer ?

 

 

Regards,

Ganesh

Link to comment
Share on other sites

And, I think that's the reason we need to put that call to display_errors at the very top of the script. The moral to take home is: It's prefereable to have display_errors set in the INI file rather than in the script in a non-production environment. Am I right?

Link to comment
Share on other sites

  • 1 year later...

1. I understand that error in "catch-device" would produce blank page. I pasted this from book:

 

<?php
ini_set (' display_errors', 1); 
?>
 
Deliberate errors produce blank page. 
2. phpinfo(); displays the info; phpinfo(): [colon instead of semicolon] displays the info with no error report; phpinfo( displays blank page
 
Any ideas?
Link to comment
Share on other sites

I'm not positive why phpinfo(): doesn't produce errors (the other two are logical). I imagine it's because : is an operator in PHP. 

But shouldn't

<?php
ini_set (' display_errors', 1); 
?>
trigger an error report rather than blank page when one parenthesis missing in the phpinfo?
Link to comment
Share on other sites

 Share

×
×
  • Create New...