The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Remove all error_log & Best error_reporting setting for php

Discussion in 'General Discussion' started by easyswiss, Jun 16, 2013.

  1. easyswiss

    easyswiss Active Member

    Joined:
    Apr 19, 2011
    Messages:
    33
    Likes Received:
    0
    Trophy Points:
    6
    How can i remove all error_log files from the customers public_html (a lot of folders, to many to make this manualy)?

    Would this here work and be a good idea?
    My problem is that the php setting was wrong so customers have very big error_log files (most depreaced notices).

    I set the error_reporting now to E_ERROR, what do you think is the best setting?
     
    #1 easyswiss, Jun 16, 2013
    Last edited: Jun 16, 2013
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,811
    Likes Received:
    671
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    While that command should work, you may want to run it without the "exec" flag first to get an idea of which files will be deleted. Here is what the php.ini on my test server uses:

    Code:
    error_reporting  =  E_ALL & ~E_NOTICE
    This is a full description of what each option outputs:

    Code:
    ; error_reporting is a bit-field.  Or each number up to get desired error
    ; reporting level
    ; E_ALL             - All errors and warnings
    ; E_ERROR           - fatal run-time errors
    ; E_WARNING         - run-time warnings (non-fatal errors)
    ; E_PARSE           - compile-time parse errors
    ; E_NOTICE          - run-time notices (these are warnings which often result
    ;                     from a bug in your code, but it's possible that it was
    ;                     intentional (e.g., using an uninitialized variable and
    ;                     relying on the fact it's automatically initialized to an
    ;                     empty string)
    ; E_CORE_ERROR      - fatal errors that occur during PHP's initial startup
    ; E_CORE_WARNING    - warnings (non-fatal errors) that occur during PHP's
    ;                     initial startup
    ; E_COMPILE_ERROR   - fatal compile-time errors
    ; E_COMPILE_WARNING - compile-time warnings (non-fatal errors)
    ; E_USER_ERROR      - user-generated error message
    ; E_USER_WARNING    - user-generated warning message
    ; E_USER_NOTICE     - user-generated notice message
    Thank you.
     
Loading...

Share This Page