PortStone

Member
Apr 25, 2018
11
1
3
Germany
cPanel Access Level
Reseller Owner
Hello,

I installed Nextcloud and everything is working fine but after enabling apcu in Nextcloud I get:

Internal Server Error

The server encountered an internal error and was unable to complete your request.
Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
More details can be found in the server log.

so I checked the logs but it doesn't generated anything. To be safe I changed in WHM > Software > Multiphp INI Editor > Editor Mode the value error_log = error_log to error_log = php_error_log. Created the log file then I restarted Apache and connected again to my Cloud which of course has still the same error. But the PHP error file is still empty. Does someone know why and can help me?
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
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,
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
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:

PHP error logs
cPanel PHP Error log empty

Thank you,
 

PortStone

Member
Apr 25, 2018
11
1
3
Germany
cPanel Access Level
Reseller Owner
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:

PHP error logs
cPanel PHP Error log empty

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
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
Hi @PortStone

Would you happen to be using PHP-FPM? It uses it's own error reporting which can be seen at

Code:
/usr/local/cpanel/logs/php-fpm/error.log
or

Code:
/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,
 

PortStone

Member
Apr 25, 2018
11
1
3
Germany
cPanel Access Level
Reseller Owner
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:
Code:
[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:
Code:
[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
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
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:

Code:
[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:

Code:
# 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:

Code:
# 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
 

PortStone

Member
Apr 25, 2018
11
1
3
Germany
cPanel Access Level
Reseller Owner
Code:
# 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
Code:
# 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
 

PortStone

Member
Apr 25, 2018
11
1
3
Germany
cPanel Access Level
Reseller Owner
Code:
# /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:
Code:
cloud.mydomain.tld-Apr-2018.gz
cloud.mydomain.tld-ssl_log-Apr-2018.gz
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
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

Code:
/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,
 

cPanelLauren

Product Owner
Staff member
Nov 14, 2017
13,296
1,271
313
Houston
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,
 

PortStone

Member
Apr 25, 2018
11
1
3
Germany
cPanel Access Level
Reseller Owner
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:


Code:
# 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.
Code:
"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.
 
Last edited: