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.

size of php error_log

Discussion in 'General Discussion' started by prakashnplink, Apr 10, 2016.

  1. prakashnplink

    prakashnplink Active Member

    Joined:
    Apr 8, 2014
    Messages:
    29
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    Hello, I see many php error_log in my server which is of size more than 500M, sometimes 2.3G too. Isn't there anyway to limit this php error_log file?

    For example:

    /home/user1/public_html/Blogs/error_log
    /home3/user2/public_html/some/other/location/error_log
    /home/user2/public_html/administrator/error_log
     
  2. 24x7server

    24x7server Well-Known Member

    Joined:
    Apr 17, 2013
    Messages:
    1,146
    Likes Received:
    34
    Trophy Points:
    48
    Location:
    India
    cPanel Access Level:
    Root Administrator

    There isn't a tweak or any tool to cull the size of error_log files created in /home/username/public_html directory. You will have to setup weekly cron to cleat error logs files of your all user, Please give a try with the following cron.

    Code:
    for i in `find /home/*/public_html -type f -name error_log` ;do >$i ;done
    
     
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,738
    Likes Received:
    661
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
  4. prakashnplink

    prakashnplink Active Member

    Joined:
    Apr 8, 2014
    Messages:
    29
    Likes Received:
    1
    Trophy Points:
    3
    cPanel Access Level:
    Root Administrator
    @aaronbrad thanks but I dont think it will work as I am not sure about the exact path of error_log. @24x7server I think I can use it. But it will be good if cpanel provide some feature for it. @cPanelMichael Thanks, I missed that plus there was no fruitful info.
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,738
    Likes Received:
    661
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Feel free to open a feature request for that functionality via:

    Submit A Feature Request

    Thanks!
     
Loading...

Share This Page