Internal Error if i try to open the Server Info / System Page

Nextcloud version : 26.0.4 (same problem on 27.0.1)
Operating system and version : Ubuntu 22.04
Apache or nginx version : Apache
PHP version: PHP 8.1

The issue you are facing:

I cant open the server info / system page it redirects me to an error messages which just says “Internal Error” Contact an Admin and look in your Protocol

I already googled the problem but the best solution to remove “shell_exec” from “disabled_function” doesnt work i already got no commands in “disabled_function” its already empty. What could be the problem? I also updated to 27.0.1, which is just available at the moment, but its just the same i still cant access the server info page. I also got no suggestions or errors in the Overview Page there is everything green. I would appreciate any help.

The solution from google which doesnt works for me:

Is this the first time you’ve seen this error? (Y/N): yes

The output of your Nextcloud log in Admin > Logging:

Exception: Call to undefined function OCA\ServerInfo\OperatingSystems\shell_exec() in file '/var/www/nextcloud/apps/serverinfo/lib/OperatingSystems/DefaultOs.php' line 260

    /var/www/nextcloud/lib/private/AppFramework/App.php - line 183:

    OC\AppFramework\Http\Dispatcher->dispatch()

    /var/www/nextcloud/lib/private/Route/Router.php - line 315:

    OC\AppFramework\App::main()

    /var/www/nextcloud/lib/base.php - line 1065:

    OC\Route\Router->match()

    /var/www/nextcloud/index.php - line 36:

    OC::handleRequest()

Verursacht durch Error: Call to undefined function OCA\ServerInfo\OperatingSystems\shell_exec()

    /var/www/nextcloud/apps/serverinfo/lib/OperatingSystems/DefaultOs.php - line 195:

    OCA\ServerInfo\OperatingSystems\DefaultOs->executeCommand()

    /var/www/nextcloud/apps/serverinfo/lib/Os.php - line 78:

    OCA\ServerInfo\OperatingSystems\DefaultOs->getDiskInfo()

    /var/www/nextcloud/apps/serverinfo/lib/Settings/AdminSettings.php - line 79:

    OCA\ServerInfo\Os->getDiskInfo()

    /var/www/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php - line 129:

    OCA\ServerInfo\Settings\AdminSettings->getForm()

    /var/www/nextcloud/apps/settings/lib/Controller/AdminSettingsController.php - line 83:

    OCA\Settings\Controller\AdminSettingsController->formatSettings()

    /var/www/nextcloud/apps/settings/lib/Controller/CommonSettingsTrait.php - line 149:

    OCA\Settings\Controller\AdminSettingsController->getSettings()

    /var/www/nextcloud/apps/settings/lib/Controller/AdminSettingsController.php - line 68:

    OCA\Settings\Controller\AdminSettingsController->getIndexResponse()

    /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 230:

    OCA\Settings\Controller\AdminSettingsController->index()

    /var/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php - line 137:

    OC\AppFramework\Http\Dispatcher->executeController()

    /var/www/nextcloud/lib/private/AppFramework/App.php - line 183:

    OC\AppFramework\Http\Dispatcher->dispatch()

    /var/www/nextcloud/lib/private/Route/Router.php - line 315:

    OC\AppFramework\App::main()

    /var/www/nextcloud/lib/base.php - line 1065:

    OC\Route\Router->match()

    /var/www/nextcloud/index.php - line 36:

    OC::handleRequest()

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'htaccess.RewriteBase' => '/',
  'instanceid' => 'XXXXX',
  'passwordsalt' => 'XXXX',
  'secret' => 'X',
  'trusted_domains' => 
  array (
    0 => 'XXX.rocks',
  ),
  'datadirectory' => '/home/data',
  'dbtype' => 'mysql',
  'version' => '26.0.4.2',
  'overwrite.cli.url' => 'https://xxx.rocks',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'XXXX',
  'dbpassword' => 'XXX',
  'installed' => true,
  'default_phone_region' => 'DE',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'filelocking.enabled' => true,
  'redis' => 
  array (
    'host' => '/var/run/redis/redis.sock',
    'port' => 0,
    'dbindex' => 0,
    'password' => '',
    'timeout' => 1.0,
  ),
  'mail_smtpmode' => 'smtp',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'XXX.rocks',
  'mail_domain' => 'XXX.com',
  'mail_smtphost' => 'XXX',
  'mail_smtpport' => '587',
  'mail_smtpauth' => 1,
  'mail_smtpname' => 'XXX',
  'mail_smtppassword' => 'XXX',
  'force_language' => 'DE',
  'defaultapp' => 'files',
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'updater.secret' => 'XXX',
);

You’re on the right track. It’s either disabled (most typically) or, in theory, it could be removed at compile time from PHP (less likely).

Is this a VPS from a provide by chance? That’s typically where you might see this if you didn’t configure it yourself that way. PHP does not disable it by default.

When you checked for disabled commands did you check all of your PHP configuration folders? There will be at least two locations (CLI and either Apache or FPM).

You’ll need to fix it in, at a minimum, your Apache PHP or FPM PHP configuration files/folders. On Ubuntu 22.04 I believe:

/etc/php/8.1/apache2/php.ini
/etc/php/8.1/fpm/php.ini

Can also be in other files located in the same tree that also get read by PHP.

Yes I got an VPS. I already checked every single php.ini in /etc/php/X.X there is no function disabled everywhere its empty.

To clarify, the line would be disable_functions (not disableD_functions):

https://www.php.net/manual/en/ini.core.php#ini.disable-functions

The file may not literally be called php.ini since directory contents are used too. Your CLI mode PHP may not be using the same config, but it may give an idea of where else to look - e.g.

www-data@d3dcb82adb67:~/html$ php -i | grep disable_functions
disable_functions => no value => no value
www-data@d3dcb82adb67:~/html$ php --ini
Configuration File (php.ini) Path: /usr/local/etc/php
Loaded Configuration File:         (none)
Scan for additional .ini files in: /usr/local/etc/php/conf.d
Additional .ini files parsed:      /usr/local/etc/php/conf.d/docker-php-ext-apcu.ini,
/usr/local/etc/php/conf.d/docker-php-ext-bcmath.ini,
/usr/local/etc/php/conf.d/docker-php-ext-exif.ini,
/usr/local/etc/php/conf.d/docker-php-ext-gd.ini,
/usr/local/etc/php/conf.d/docker-php-ext-gmp.ini,
/usr/local/etc/php/conf.d/docker-php-ext-imagick.ini,
/usr/local/etc/php/conf.d/docker-php-ext-intl.ini,
/usr/local/etc/php/conf.d/docker-php-ext-ldap.ini,
/usr/local/etc/php/conf.d/docker-php-ext-memcached.ini,
/usr/local/etc/php/conf.d/docker-php-ext-opcache.ini,
/usr/local/etc/php/conf.d/docker-php-ext-pcntl.ini,
/usr/local/etc/php/conf.d/docker-php-ext-pdo_mysql.ini,
/usr/local/etc/php/conf.d/docker-php-ext-pdo_pgsql.ini,
/usr/local/etc/php/conf.d/docker-php-ext-redis.ini,
/usr/local/etc/php/conf.d/docker-php-ext-sodium.ini,
/usr/local/etc/php/conf.d/docker-php-ext-sysvsem.ini,
/usr/local/etc/php/conf.d/docker-php-ext-zip.ini,
/usr/local/etc/php/conf.d/nextcloud.ini,
/usr/local/etc/php/conf.d/opcache-recommended.ini,
/usr/local/etc/php/conf.d/redis-session.ini

I have still the same issue, i searched for this “disable_functions” and found it in any possible .ini file for php (cli, apach2, fpm) but its already empty there is nothing written. I dont know how to solve it

I still have the same problem, can anyone help? Thats the error message

 Exception Call to undefined function OCA\ServerInfo\OperatingSystems\shell_exec() in file '/var/www/nextcloud/apps/serverinfo/lib/OperatingSystems/Linux.php' line 265

    /var/www/nextcloud/lib/private/AppFramework/App.phpZeile 184

    OC\AppFramework\Http\Dispatcher->dispatch()

    /var/www/nextcloud/lib/private/Route/Router.phpZeile 315

    OC\AppFramework\App::main()

    /var/www/nextcloud/lib/base.phpZeile 1069

    OC\Route\Router->match()

    /var/www/nextcloud/index.phpZeile 39

    OC::handleRequest()

Verursacht von Error Call to undefined function OCA\ServerInfo\OperatingSystems\shell_exec()

I believe it can be set in the FPM conf too. If you’re using a control panel, look around for PHP related options in there too.

P.S. Not a solution, but to stop the error in the meantime you can run the serverinfo app in restricted mode: GitHub - nextcloud/serverinfo: 📊 A monitoring app which creates a server info dashboard for admins