SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    Confirmed Halfwit
    Join Date
    Oct 1999
    Location
    Vancouver, BC, Canada
    Posts
    983
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question What level of "error reporting" do you recommend?

    I'm just curious what other people are using for error reporting.

    I've had a number of recent complaint for one of my scripts that users are getting lots of these types of errors:

    "Notice: Undefined variable:".....
    So I am not using error_reporting(0); at the top of the script. This suppresses the warnings, etc...

    But it got me thinking.. what do other php programmers recommend and use for their scripts? What level of error reporting do you set?

    Thanks!
    - A simple online WYSIWYG editor for HTML code snippets.
    - Managed Web Hosting - $3.95/month (resellers welcome)
    - Why pay more? $8.95 domains & $9.95 SSL certificates!

  2. #2
    SitePoint Zealot musher's Avatar
    Join Date
    Nov 2005
    Location
    Hull, England
    Posts
    161
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I use
    Code:
    error_reporting E_ALL ~E_NOTICE
    in my php.ini, but I shouldn't really.

  3. #3
    SitePoint Wizard silver trophy
    Join Date
    Mar 2006
    Posts
    6,132
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    when im developing, i always use E_ALL

    when a site is live, i usually either use either
    E_ALL or
    E_ALL ~E_NOTICE
    depending on how strict i wrote my code.

    but when the site is live i dont display errors
    ini_set('display_errors' false);
    but i log errors so i can check them from time to time

  4. #4
    SitePoint Enthusiast
    Join Date
    Jan 2005
    Location
    UK
    Posts
    97
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    E_ALL, it is very easy to fix Notices during development so I see no reason not to.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •