DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Let Php Show All Errors

  • submit to reddit
        I have wondered why my php script doesn't show
errors like it did before. It seems my server admin
has default config set not to show the errors.

Here's how to override it.
ini_set('display_errors', '1');

BTW, it's really a pain to code in a language that
demand a ';' after every line.    


Yuri A replied on Fri, 2014/10/17 - 9:26am

 It is very difficult to find out an inline error in PHP but this tool and tick would help I guess, The great share I'm gonna use it. Thanks!

Kim @ Vinity Soft

Joesph Adat replied on Tue, 2014/07/22 - 6:09pm

You get used to the "a" after each line. 

Jhon Smith replied on Thu, 2014/05/29 - 4:12am

error repoting is great way to solve php related errors.

router tech support 

Uchenna Ani-Okoye replied on Tue, 2014/05/13 - 7:29pm

 I recently used that error to hide warnings on my WordPress blog. I think there should be a separate code for warnings, because errors, shouldn't really be hidden as you want to repair any error ASAP .

Jhon Smith replied on Fri, 2014/04/18 - 1:50am

You provide a good post to solve these errors by using this method. This is good trick to solve PHP error repoting. 


Budy K. Ir replied on Tue, 2014/03/18 - 11:30pm

pain with ';'   ? try Python :D  Python 

Jaffa Wify replied on Tue, 2013/10/22 - 2:39am

 Distinct compilers permit been developed which decouple the PHP tongue from the interpreter. Benefits of compilation contain mend guillotine run, unchanging analysis, besides improved interoperability among canon written in different phraseologys. Thank you.  press release distribution services

Joseph P Joseph replied on Tue, 2013/09/10 - 3:26am

This is a very good PHP error reporting tool. Registering the errors and not displaying them as they occur is a very convenient means of completing the work in time. It also helps in tracking the errors that has occurred. Try this link to get more information on PHP error reporting. 

fix now 

Maria Bales replied on Fri, 2012/08/10 - 4:00am

There is a great guide to implementing this plus how to make the system log the errors instead of displaying them and code specific for drupal, wordpress and other cms systems


Snippets Manager replied on Mon, 2011/08/01 - 5:05am

Here's the best reference for setting PHP's error reporting:

Snippets Manager replied on Tue, 2009/09/22 - 3:21am

Snippets Manager replied on Tue, 2009/09/22 - 3:21am

This is a great method. There is a great guide to implementing this plus how to make the system log the errors instead of displaying them and code specific for drupal, wordpress and other cms systems. check it out

Hans Zimmer replied on Tue, 2006/03/28 - 11:16am

Coming from the C and Perl side I don't mind the trailing semicolon. Although I like Ruby very much these day. ;)

Snippets Manager replied on Mon, 2012/05/07 - 2:21pm

korakot is primarily a Python coder, not ASP ;-) That said, Ruby is similar.

Chris Meller replied on Mon, 2006/02/20 - 4:02am

If you don't like the ; maybe you'd be happier back in ASP, where you have no idea when a line's ending... Unfortunately, then you'd have to deal with the other million ASP suckage points.