Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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

    Apr 19, 2011
    Likes Received:
    Trophy Points:
    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 Technical Support Community Manager
    Staff Member

    Apr 11, 2011
    Likes Received:
    Trophy Points:
    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:

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

    ; 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.
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice