Skip to main content

Replaced error log not populating

Comments

11 comments

  • cPanelLauren
    Hi @ca2236 Are you sure the log was currently being written to? You may also need to ensure that php error logging is enabled in the php.ini for that version of PHP. You can make modifications to this from WHM>>Software>>MultiPHP INI Manager
    0
  • ca2236
    Hi Thank you for taking the time to write back. The log was definitely being written to before I moved it. Other than display_errors (which is disabled), I do not see anything for error logging under MultiPHP INI Manager. I did just now correct file permissions, but nothing that would cause it not to write. (user always had rw)
    0
  • cPanelLauren
    Hi @ca2236 Ownership of the file is the user's UID/GID? Also you'd need to modify the lines as follows: ; 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 (Event Log on NT, not valid in Windows 95). ;error_log = syslog error_log = error_log
    ; Besides displaying errors, PHP can also log errors to locations such as a ; server-specific log, STDERR, or a location specified by the error_log ; directive found below. While errors should not be displayed on productions ; servers they should still be monitored and logging is a great way to do that. ; Default Value: Off ; Development Value: On ; Production Value: On ; http://php.net/log-errors log_errors = On
    In the editor mode of the PHP version. If you're running PHP-FPM errors will not be logged here by default, they will be logged to /home/$user/log/domain_tld.php.error.log
    Thanks!
    0
  • ca2236
    Hi @cPanelLauren I didn't have any of that in my php.ini. So I added log_errors=on and error_log = error_log. the error log is owned by the same user/group as the rest of the directory. There is still no output into it. I do not think I'm running php-fpm as I don't have the logs mentioned and ps aux | grep php-fpm returns nothing. Here is the content of my php.ini file cPanel-generated php ini directives, do not edit ; Manual editing of this file may result in unexpected behavior. ; To make changes to this file, use the cPanel MultiPHP INI Editor (Home >> Software >> MultiPHP INI Editor) ; For more information, read our documentation (PHP Home - EasyApache 4 - cPanel Documentation) display_errors = Off max_execution_time = 30 max_input_time = 60 max_input_vars = 1000 memory_limit = 128M post_max_size = 8M session.gc_maxlifetime = 1440 session.save_path = "/var/cpanel/php/sessions/ea-php71" upload_max_filesize = 2M zlib.output_compression = Off error_log= error_log log_errors=on
    0
  • cPanelLauren
    Hi @ca2236 This is the user's php.ini can you check the php.ini through WHM as I indicated previously - WHM>>Software>>MultiPHP INI Manager -> PHP 7.1 -> Editor mode Is it also possible that there aren't current errors for the domain in question? Thanks!
    0
  • ca2236
    Hi @cPanelLauren You are correct, I apologize. I checked the location it and it shows the error_log = error_log and log_errors= on for the version of php the site is running. since the cpanel module errors (under metrics) is blank and the public_html/error_log is blank. I was trying to look around and find errors from various logs taken from The cPanel Log Files - cPanel Knowledge Base - cPanel Documentation I'm not finding, so far, any error about not writing to error_log. If you can help with a specific location to look, I would gladly take the advice, I'm still new to cpanel. :) I did find an interesting error I wanted to ask about. Can you tell me what this means? Timeout waiting for output from CGI script /usr/local/cpanel/cgi-sys/ea-php71, referer:
    0
  • cPanelLauren
    Hi @ca2236 I just want to confirm how you are testing that there aren't any errors and to make sure you are looking for PHP specific errors, as that is all that will be logged to that specific error log. It won't repopulate until there are PHP errors to log.
    Timeout waiting for output from CGI script /usr/local/cpanel/cgi-sys/ea-php71, referer:
    0
  • ca2236
    hi @cPanelLauren I want to verify that I understand correctly with public_html\error_log. You are saying that it will be empty if there is nothing to write? That makes sense, but I guess I was having a hard time accepting something wasn't wrong due to the previous file. I will go ahead and open a new ticket for the wp-cron timeout question.
    0
  • cPanelLauren
    I want to verify that I understand correctly with public_html\error_log. You are saying that it will be empty if there is nothing to write? That makes sense, but I guess I was having a hard time accepting something wasn't wrong due to the previous file.

    Yes, exactly, that error may be written to the Apache error logs separately from the PHP logs.
    I will go ahead and open a new ticket for the wp-cron timeout question.

    Sounds good! Thanks!
    0
  • ca2236
    I think for now, we can mark this thread as resolved. Thank you for the information. I will reopen or open a new one if need be.
    0
  • cPanelLauren
    Hi @ca2236 I can do that, I'm glad to hear it. Thanks!
    0

Please sign in to leave a comment.