Skip to main content

Creating PHP error log issue

Comments

16 comments

  • cPanelLauren
    Hi @PortStone The details of the 500 error should be output to the Apache error logs. You can see them at /etc/apache2/logs/error_log - can you let us know what the related errors are there? Thank you,
    0
  • PortStone
    Hi @PortStone The details of the 500 error should be output to the Apache error logs. You can see them at /etc/apache2/logs/error_log - can you let us know what the related errors are there? Thank you,

    Doesn't generates new lines if I visit the site (
    0
  • cPanelLauren
    Hello, In that case, can you please show me what you have for Error reporting ultimately it would be best for this purpose to be reporting E_ALL Where are you looking for the log/where did you create it? The following forum posts also go over this: Thank you,
    0
  • PortStone
    Hello, In that case, can you please show me what you have for Error reporting ultimately it would be best for this purpose to be reporting E_ALL Where are you looking for the log/where did you create it? The following forum posts also go over this: Thank you,

    error_reporting = E_ALL & ~E_NOTICE standard from cPanel. Changing it to error_reporting = E_ALL doesn't generate traffic either. /home/${user}/public_html/cloud
    0
  • cPanelLauren
    Hi @PortStone Would you happen to be using PHP-FPM? It uses it's own error reporting which can be seen at /usr/local/cpanel/logs/php-fpm/error.log
    or /opt/cpanel/ea-phpXX/root/usr/var/log/php-fpm/error.log
    replace ea-phpXX with your ea-php version (i.e. ea-php70) Thank you,
    0
  • PortStone
    Hello, I used PHP-FPM the whole time, didn't knew this had their logs on another path. /usr/local/cpanel/logs/php-fpm/error.log: [21-Apr-2018 15:00:25] NOTICE: fpm is running, pid 30456 [21-Apr-2018 15:00:25] NOTICE: ready to handle connections [21-Apr-2018 15:04:31] NOTICE: Terminating ... [21-Apr-2018 15:04:31] NOTICE: exiting, bye-bye! [21-Apr-2018 15:50:14] NOTICE: fpm is running, pid 2944 [21-Apr-2018 15:50:14] NOTICE: ready to handle connections [21-Apr-2018 15:50:16] NOTICE: Reloading in progress ... [21-Apr-2018 15:50:16] NOTICE: reloading: execvp("/usr/local/cpanel/sbin/cpanel_php_fpm", {"/usr/local/cpanel/sbin/cpanel_php_fpm", "-y", "/usr/local/cpanel/etc/php-fpm.conf"}) [21-Apr-2018 15:50:16] NOTICE: using inherited socket fd=8, "/var/cpanel/php-fpm/cpanelphpmyadmin/sock" [21-Apr-2018 15:50:16] NOTICE: using inherited socket fd=8, "/var/cpanel/php-fpm/cpanelphpmyadmin/sock" [21-Apr-2018 15:50:16] NOTICE: using inherited socket fd=9, "/var/cpanel/php-fpm/cpanelphppgadmin/sock" [21-Apr-2018 15:50:16] NOTICE: using inherited socket fd=9, "/var/cpanel/php-fpm/cpanelphppgadmin/sock" [21-Apr-2018 15:50:16] NOTICE: using inherited socket fd=10, "/var/cpanel/php-fpm/cpanelroundcube/sock" [21-Apr-2018 15:50:16] NOTICE: using inherited socket fd=10, "/var/cpanel/php-fpm/cpanelroundcube/sock" [21-Apr-2018 15:50:16] NOTICE: fpm is running, pid 2962 [21-Apr-2018 15:50:16] NOTICE: ready to handle connections [21-Apr-2018 15:50:32] NOTICE: Terminating ... [21-Apr-2018 15:50:32] NOTICE: exiting, bye-bye! [21-Apr-2018 15:52:30] NOTICE: fpm is running, pid 1314 [21-Apr-2018 15:52:30] NOTICE: ready to handle connections [21-Apr-2018 15:55:12] NOTICE: Reloading in progress ... [21-Apr-2018 15:55:12] NOTICE: reloading: execvp("/usr/local/cpanel/sbin/cpanel_php_fpm", {"/usr/local/cpanel/sbin/cpanel_php_fpm", "-y", "/usr/local/cpanel/etc/php-fpm.conf"}) [21-Apr-2018 15:55:13] NOTICE: using inherited socket fd=8, "/var/cpanel/php-fpm/cpanelphpmyadmin/sock" [21-Apr-2018 15:55:13] NOTICE: using inherited socket fd=8, "/var/cpanel/php-fpm/cpanelphpmyadmin/sock" [21-Apr-2018 15:55:13] NOTICE: using inherited socket fd=9, "/var/cpanel/php-fpm/cpanelphppgadmin/sock" [21-Apr-2018 15:55:13] NOTICE: using inherited socket fd=9, "/var/cpanel/php-fpm/cpanelphppgadmin/sock" [21-Apr-2018 15:55:13] NOTICE: using inherited socket fd=10, "/var/cpanel/php-fpm/cpanelroundcube/sock" [21-Apr-2018 15:55:13] NOTICE: using inherited socket fd=10, "/var/cpanel/php-fpm/cpanelroundcube/sock" [21-Apr-2018 15:55:13] NOTICE: fpm is running, pid 1579 [21-Apr-2018 15:55:13] NOTICE: ready to handle connections [21-Apr-2018 20:20:16] NOTICE: Reloading in progress ... [21-Apr-2018 20:20:16] NOTICE: reloading: execvp("/usr/local/cpanel/sbin/cpanel_php_fpm", {"/usr/local/cpanel/sbin/cpanel_php_fpm", "-y", "/usr/local/cpanel/etc/php-fpm.conf"}) [21-Apr-2018 20:20:16] NOTICE: using inherited socket fd=8, "/var/cpanel/php-fpm/cpanelphpmyadmin/sock" [21-Apr-2018 20:20:16] NOTICE: using inherited socket fd=8, "/var/cpanel/php-fpm/cpanelphpmyadmin/sock" [21-Apr-2018 20:20:16] NOTICE: using inherited socket fd=9, "/var/cpanel/php-fpm/cpanelphppgadmin/sock" [21-Apr-2018 20:20:16] NOTICE: using inherited socket fd=9, "/var/cpanel/php-fpm/cpanelphppgadmin/sock" [21-Apr-2018 20:20:16] NOTICE: using inherited socket fd=10, "/var/cpanel/php-fpm/cpanelroundcube/sock" [21-Apr-2018 20:20:16] NOTICE: using inherited socket fd=10, "/var/cpanel/php-fpm/cpanelroundcube/sock" [21-Apr-2018 20:20:16] NOTICE: using inherited socket fd=12, "/var/cpanel/php-fpm/thestonegroup/sock" [21-Apr-2018 20:20:16] NOTICE: using inherited socket fd=12, "/var/cpanel/php-fpm/thestonegroup/sock" [21-Apr-2018 20:20:16] NOTICE: fpm is running, pid 10357 [21-Apr-2018 20:20:16] NOTICE: ready to handle connections [22-Apr-2018 16:36:08] NOTICE: Reloading in progress ... [22-Apr-2018 16:36:08] NOTICE: reloading: execvp("/usr/local/cpanel/sbin/cpanel_php_fpm", {"/usr/local/cpanel/sbin/cpanel_php_fpm", "-y", "/usr/local/cpanel/etc/php-fpm.conf"}) [22-Apr-2018 16:36:08] NOTICE: using inherited socket fd=8, "/var/cpanel/php-fpm/cpanelphpmyadmin/sock" [22-Apr-2018 16:36:08] NOTICE: using inherited socket fd=8, "/var/cpanel/php-fpm/cpanelphpmyadmin/sock" [22-Apr-2018 16:36:08] NOTICE: using inherited socket fd=9, "/var/cpanel/php-fpm/cpanelphppgadmin/sock" [22-Apr-2018 16:36:08] NOTICE: using inherited socket fd=9, "/var/cpanel/php-fpm/cpanelphppgadmin/sock" [22-Apr-2018 16:36:08] NOTICE: using inherited socket fd=10, "/var/cpanel/php-fpm/cpanelroundcube/sock" [22-Apr-2018 16:36:08] NOTICE: using inherited socket fd=10, "/var/cpanel/php-fpm/cpanelroundcube/sock" [22-Apr-2018 16:36:08] NOTICE: using inherited socket fd=19, "/var/cpanel/php-fpm/portstone/sock" [22-Apr-2018 16:36:08] NOTICE: using inherited socket fd=19, "/var/cpanel/php-fpm/portstone/sock" [22-Apr-2018 16:36:08] NOTICE: fpm is running, pid 18152 [22-Apr-2018 16:36:08] NOTICE: ready to handle connections [22-Apr-2018 16:39:01] NOTICE: Reloading in progress ... [22-Apr-2018 16:39:01] NOTICE: reloading: execvp("/usr/local/cpanel/sbin/cpanel_php_fpm", {"/usr/local/cpanel/sbin/cpanel_php_fpm", "-y", "/usr/local/cpanel/etc/php-fpm.conf"}) [22-Apr-2018 16:39:01] NOTICE: using inherited socket fd=8, "/var/cpanel/php-fpm/cpanelphpmyadmin/sock" [22-Apr-2018 16:39:01] NOTICE: using inherited socket fd=8, "/var/cpanel/php-fpm/cpanelphpmyadmin/sock" [22-Apr-2018 16:39:01] NOTICE: using inherited socket fd=9, "/var/cpanel/php-fpm/cpanelphppgadmin/sock" [22-Apr-2018 16:39:01] NOTICE: using inherited socket fd=9, "/var/cpanel/php-fpm/cpanelphppgadmin/sock" [22-Apr-2018 16:39:01] NOTICE: using inherited socket fd=10, "/var/cpanel/php-fpm/cpanelroundcube/sock" [22-Apr-2018 16:39:01] NOTICE: using inherited socket fd=10, "/var/cpanel/php-fpm/cpanelroundcube/sock" [22-Apr-2018 16:39:01] NOTICE: fpm is running, pid 18553 [22-Apr-2018 16:39:01] NOTICE: ready to handle connections [22-Apr-2018 21:20:56] NOTICE: Terminating ... [22-Apr-2018 21:20:56] NOTICE: exiting, bye-bye! [22-Apr-2018 23:22:43] NOTICE: fpm is running, pid 1625 [22-Apr-2018 23:22:43] NOTICE: ready to handle connections [23-Apr-2018 22:52:39] NOTICE: Terminating ... [23-Apr-2018 22:52:39] NOTICE: exiting, bye-bye! [23-Apr-2018 22:54:50] NOTICE: fpm is running, pid 1693 [23-Apr-2018 22:54:50] NOTICE: ready to handle connections
    was the complete log /opt/cpanel/ea-php71/root/usr/var/log/php-fpm/error.log: [24-Apr-2018 15:28:58] NOTICE: fpm is running, pid 22529 [24-Apr-2018 15:28:58] NOTICE: ready to handle connections [24-Apr-2018 15:28:58] NOTICE: systemd monitor interval set to 10000ms [24-Apr-2018 15:31:56] WARNING: [pool cloud_mydomain.tld] server reached max_children setting (5), consider raising it [24-Apr-2018 15:32:46] WARNING: [pool cloud_mydomain.tld] server reached max_children setting (5), consider raising it [24-Apr-2018 15:46:19] WARNING: [pool cloud_mydomain.tld] server reached max_children setting (5), consider raising it [24-Apr-2018 15:47:56] WARNING: [pool cloud_mydomain.tld] server reached max_children setting (5), consider raising it [24-Apr-2018 16:20:28] WARNING: [pool cloud_mydomain.tld] server reached max_children setting (5), consider raising it [24-Apr-2018 20:55:26] NOTICE: Terminating ... [24-Apr-2018 20:55:26] NOTICE: exiting, bye-bye! [24-Apr-2018 20:55:27] NOTICE: fpm is running, pid 4994 [24-Apr-2018 20:55:27] NOTICE: ready to handle connections [24-Apr-2018 20:55:27] NOTICE: systemd monitor interval set to 10000ms [24-Apr-2018 20:58:30] WARNING: [pool cloud_mydomain.tld] server reached max_children setting (5), consider raising it [24-Apr-2018 21:48:08] NOTICE: Terminating ... [24-Apr-2018 21:48:08] NOTICE: exiting, bye-bye! [24-Apr-2018 21:48:08] NOTICE: fpm is running, pid 15169 [24-Apr-2018 21:48:08] NOTICE: ready to handle connections [24-Apr-2018 21:48:08] NOTICE: systemd monitor interval set to 10000ms [24-Apr-2018 21:51:02] NOTICE: Terminating ... [24-Apr-2018 21:51:02] NOTICE: exiting, bye-bye! [24-Apr-2018 21:51:02] NOTICE: fpm is running, pid 15330 [24-Apr-2018 21:51:02] NOTICE: ready to handle connections [24-Apr-2018 21:51:02] NOTICE: systemd monitor interval set to 10000ms [24-Apr-2018 22:08:20] WARNING: [pool cloud_mydomain.tld] server reached max_children setting (5), consider raising it [24-Apr-2018 22:09:08] NOTICE: [pool cloud_mydomain.tld] child 17452 exited with code 0 after 48.414564 seconds from start [24-Apr-2018 22:09:08] NOTICE: [pool cloud_mydomain.tld] child 17469 started [25-Apr-2018 00:51:13] NOTICE: Terminating ... [25-Apr-2018 00:51:13] NOTICE: exiting, bye-bye! [25-Apr-2018 00:51:13] NOTICE: fpm is running, pid 22515 [25-Apr-2018 00:51:13] NOTICE: ready to handle connections [25-Apr-2018 00:51:13] NOTICE: systemd monitor interval set to 10000ms [25-Apr-2018 00:51:42] NOTICE: Terminating ... [25-Apr-2018 00:51:42] NOTICE: exiting, bye-bye! [25-Apr-2018 00:51:42] NOTICE: fpm is running, pid 23255 [25-Apr-2018 00:51:42] NOTICE: ready to handle connections [25-Apr-2018 00:51:42] NOTICE: systemd monitor interval set to 10000ms [25-Apr-2018 06:56:55] NOTICE: Terminating ... [25-Apr-2018 06:56:55] NOTICE: exiting, bye-bye! [25-Apr-2018 06:56:55] NOTICE: fpm is running, pid 1787 [25-Apr-2018 06:56:55] NOTICE: ready to handle connections [25-Apr-2018 06:56:55] NOTICE: systemd monitor interval set to 10000ms [25-Apr-2018 17:08:54] NOTICE: Terminating ... [25-Apr-2018 17:08:54] NOTICE: exiting, bye-bye! [25-Apr-2018 17:08:55] NOTICE: fpm is running, pid 20756 [25-Apr-2018 17:08:55] NOTICE: ready to handle connections [25-Apr-2018 17:08:55] NOTICE: systemd monitor interval set to 10000ms [25-Apr-2018 17:50:38] NOTICE: Terminating ... [25-Apr-2018 17:50:38] NOTICE: exiting, bye-bye! [25-Apr-2018 17:50:39] NOTICE: fpm is running, pid 24226 [25-Apr-2018 17:50:39] NOTICE: ready to handle connections [25-Apr-2018 17:50:39] NOTICE: systemd monitor interval set to 10000ms
    last 51 lines of code
    0
  • cPanelLauren
    Hello @PortStone The only thing I see relevant in the PHP-FPM error log is in the second one which indicates you might need to manage the PHP-FPM pool for the domain: [24-Apr-2018 22:08:20] WARNING: [pool cloud_mydomain.tld] server reached max_children setting (5), consider raising it
    Can you also run the following to see if you're logging to an "error_log" file elsewhere? For example I ran mine for php 7.0 on my test server: # egrep 'error_log = |log_errors = |error_reporting = ' /opt/cpanel/ea-php70/root/etc/php.ini error_reporting = E_ALL & ~E_NOTICE log_errors = On error_log = "error_log"
    If it's set in the same manner can you confirm that there is not an error_log located in the documentroot for the domain as well as the following: # grep error /opt/cpanel/ea-php70/root/etc/php-fpm.d/domain.tld.conf php_admin_flag[log_errors] = on php_admin_value[error_log] = /home/$USER/logs/domain_tld.php.error.log php_value[error_reporting] = E_ALL & ~E_NOTICE
    0
  • PortStone
    # egrep 'error_log = |log_errors = |error_reporting = ' /opt/cpanel/ea-php71/root/etc/php.ini error_reporting = E_ALL log_errors = On ;error_log = php_errors.log ;error_log = syslog error_log = php_error_log
    # grep error /opt/cpanel/ea-php71/root/etc/php-fpm.d/cloud.mydomain.tld.conf php_admin_flag[log_errors] = on php_admin_value[error_log] = /home/$user/logs/cloud_mydomain_tld.php.error.log php_value[error_reporting] = E_ALL & ~E_NOTICE
    0
  • cPanelLauren
    Great! Can you tell me if the log here is populated: /home/$user/logs/cloud_mydomain_tld.php.error.log
    0
  • PortStone
    # /home/$user/logs/mydomain.tld.php.error.log -bash: /home/$user/logs/mydomain.tld.php.error.log: No such file or directory
    normal logs are created: cloud.mydomain.tld-Apr-2018.gz cloud.mydomain.tld-ssl_log-Apr-2018.gz
    0
  • cPanelLauren
    Hello, Your conf file shows the error log as being enabled. On my test domain with this enabled, I have the errors for the PHP error log being output to /home/myusername/logs/mydomain.tld.php.error.log
    Were you sure to replace $user with the actual username and mydomain.tld with your actual domain name? Thank you,
    0
  • PortStone
    Hello, yes I did. I even checked through SFTP to see which logs are there.
    0
  • cPanelLauren
    Hi @PortStone Please use the link in my signature top open a ticket, I think it will be easier to take a closer look if we're able to access the system. Once it's open please update this thread with the ticket ID Thank you,
    0
  • PortStone
    Hello, Ticket ID: 9470499
    0
  • cPanelLauren
    Thanks @PortStone I'll update the thread with the outcome of the ticket once it's complete.
    0
  • PortStone
    Hello, thank you very much EDIT: Nextcloud doesn't generate logs. If you want it do that you must have following settings in config.php: # PARAMETERS 0: DEBUG: All activity; the most detailed logging. 1: INFO: Activity such as user logins and file activities, plus warnings, errors, and fatal errors. 2: WARN: Operations succeed, but with warnings of potential problems, plus errors and fatal errors. 3: ERROR: An operation fails, but other services and operations continue, plus fatal errors. 4: FATAL: The server stops.
    "log_type" => "owncloud", "logfile" => "nextcloud.log", "loglevel" => "3", "logdateformat" => "F d, Y H:i:s",
    I thought because of some misconfiguration in cPanel this behavior was happening.
    0

Please sign in to leave a comment.