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!

SOLVED error_log in public_html?

Discussion in 'General Discussion' started by ca2236, Mar 8, 2019.

  1. ca2236

    ca2236 Well-Known Member

    Joined:
    Feb 2, 2018
    Messages:
    96
    Likes Received:
    12
    Trophy Points:
    8
    Location:
    Nebraska
    cPanel Access Level:
    DataCenter Provider
    can someone tell me how the error_log in public_html get created and logged? we have a site that is not getting theirs updated.

    Thanks
     
  2. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,476
    Likes Received:
    507
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hello @ca2236

    This is created by enabling error logging for the PHP version. You can enable it by going to WHM>>Software>>MultiPHP INI Editor -> Editor Mode

    Code:
    ; Log errors to specified file. PHP's default behavior is to leave this value
    ; empty.
    ; http://php.net/error-log
    ; Example:
    ;error_log = php_errors.log
    ; Log errors to syslog.
    ;error_log = syslog
    error_log = error_log
    Code:
    ; Log errors to specified file. PHP's default behavior is to leave this value
    ; empty.
    ; http://php.net/error-log
    ; Example:
    ;error_log = php_errors.log
    ; Log errors to syslog.
    ;error_log = syslog
    error_log = error_log
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. ca2236

    ca2236 Well-Known Member

    Joined:
    Feb 2, 2018
    Messages:
    96
    Likes Received:
    12
    Trophy Points:
    8
    Location:
    Nebraska
    cPanel Access Level:
    DataCenter Provider
    Thanks,

    However, I have a follow up question, on sites that do have the error_log working, it doesn't have this in the multiPHP INI Editor. It just is the text version of Basic typically. Is this due to using inherited php settings on multi php manager and it pulls from a global setting? If so.. Why is that working for the local file when the above code doesn't exist?

    Sorry for asking, just trying to grasp this.
     
  4. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,476
    Likes Received:
    507
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    It's possible this is set locally for those domains, within their respective php.ini, if you're running wordpress you can also enable error logging in the wp-config.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  5. ca2236

    ca2236 Well-Known Member

    Joined:
    Feb 2, 2018
    Messages:
    96
    Likes Received:
    12
    Trophy Points:
    8
    Location:
    Nebraska
    cPanel Access Level:
    DataCenter Provider
    Ok Thanks,
    are the respective php.ini files inside of the public_html? I would imagine to be so. also, I know this is outside of cpanel specifically
     
  6. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,476
    Likes Received:
    507
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Yea, they should be, they can also be in /home/$user but most commonly found in /home/$user/public_html - you'd be looking for any .ini file most commonly there's user.ini, local.ini and php.ini
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  7. ca2236

    ca2236 Well-Known Member

    Joined:
    Feb 2, 2018
    Messages:
    96
    Likes Received:
    12
    Trophy Points:
    8
    Location:
    Nebraska
    cPanel Access Level:
    DataCenter Provider
    Thanks,

    This might be out of scope of cpanel, it still doesn't appear to log. when pasting

    ; Log errors to specified file. PHP's default behavior is to leave this value
    ; empty.
    ; PHP: Runtime Configuration - Manual
    ; Example:
    ;error_log = php_errors.log
    ; Log errors to syslog.
    ;error_log = syslog
    error_log = error_log


    do I need a full path in error_log =
     
  8. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,476
    Likes Received:
    507
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @ca2236

    What's set for this:

    Code:
    error_reporting = E_ALL & ~E_NOTICE
    
    It should be uncommented and appear just as it does above
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  9. ca2236

    ca2236 Well-Known Member

    Joined:
    Feb 2, 2018
    Messages:
    96
    Likes Received:
    12
    Trophy Points:
    8
    Location:
    Nebraska
    cPanel Access Level:
    DataCenter Provider
    There was nothing in the php.ini . I had to add everything you posted to me. I can add this and let you know.
     
  10. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,476
    Likes Received:
    507
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  11. ca2236

    ca2236 Well-Known Member

    Joined:
    Feb 2, 2018
    Messages:
    96
    Likes Received:
    12
    Trophy Points:
    8
    Location:
    Nebraska
    cPanel Access Level:
    DataCenter Provider
    We are not. Thanks for all of these links, what is confusing is that the other sites do not have all these specific settings declared in /home/<username>/public_html/php.ini or the MultiPHP INI editor.

    However, it is working.
     
    cPanelLauren likes this.
  12. cPanelLauren

    cPanelLauren Forums Analyst II Staff Member

    Joined:
    Nov 14, 2017
    Messages:
    6,476
    Likes Received:
    507
    Trophy Points:
    263
    Location:
    Houston
    cPanel Access Level:
    DataCenter Provider
    Hi @ca2236

    There's a multitude of differences that could be present, I am glad it's working now though!


    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

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