Server: Call to undefined function OC\Settings\Controller\posix_getuid()

Created on 3 Oct 2018  路  3Comments  路  Source: nextcloud/server

Steps to reproduce

  1. Make Caldav Request to https:/[cloudhost]/remote.php/dav/
  2. Get "undefined function"-error in logfile (see attached), requests dies

Expected behaviour

not to get error, or when error the reqeust should go on
it seems to be an optional check, so the reqeust should not die

Actual behaviour

se steps to reproduce

Server configuration

Operating system: linux

Web server: apache

Database: mysql

PHP version: 7

Nextcloud version: 14.0.1

Updated from an older Nextcloud/ownCloud or fresh install: updated

Where did you install Nextcloud from: downloaded zip

Signing status:


Signing status

No errors have been found.

List of activated apps:


App list

The posix extensions are required - see http://php.net/manual/en/book.posix.php

Nextcloud configuration:


Config report

The posix extensions are required - see http://php.net/manual/en/book.posix.php

or 

$CONFIG = array (
  'instanceid' => 'instanceid',
  'passwordsalt' => 'passwordsalt',
  'secret' => 'secret',
  'trusted_domains' =>
  array (
    0 => 'host',
  ),
  'overwriteprotocol' => 'https',
  'datadirectory' => 'datadirectory',
  'overwrite.cli.url' => overwrite.cli.url',
  'dbtype' => 'mysql',
  'version' => '14.0.1.1',
  'dbname' => 'dbname',
  'dbhost' => 'dbhost',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'p404658',
  'dbpassword' => 'dbpassword',
  'logtimezone' => 'UTC',
  'installed' => true,
  'maintenance' => false,
  'theme' => '',
  'loglevel' => 2,
  'mail_from_address' => 'mail',
  'mail_smtpmode' => 'smtp',
  'mail_domain' => 'mail_domain',
  'mail_smtpauthtype' => 'PLAIN',
  'mail_smtpauth' => 1,
  'mail_smtphost' => 'mail_smtphost',
  'mail_smtpport' => '587',
  'mail_smtpname' => 'mail_smtpname',
  'mail_smtppassword' => 'mail_smtppassword',
  'mail_smtpsecure' => 'tls',
  'updater.release.channel' => 'stable',
  'memcache.local' => '\\OC\\Memcache\\APCu',
);

Are you using external storage, if yes which one: no

Are you using encryption: no

Are you using an external user-backend, if yes which one: no

Client configuration

Browser: Chrome / Android calDav Adapter

Operating system:

Logs

Web server error log


Web server error log

I cannot access the logs

Nextcloud log (data/nextcloud.log)


Nextcloud log

Error:聽Call to undefined function OC\Settings\Controller\posix_getuid()

/[src-root]/settings/Controller/CheckSetupController.php聽- line 624:
OC\Settings\Controller\CheckSetupController->getAppDirsWithDifferentOwner()

/[src-root]/lib/private/AppFramework/Http/Dispatcher.php聽- line 166:
OC\Settings\Controller\CheckSetupController->check()

/[src-root]/lib/private/AppFramework/Http/Dispatcher.php聽- line 99:
OC\AppFramework\Http\Dispatcher->executeController(OC\Settings\ ... {},聽"check")

/[src-root]/lib/private/AppFramework/App.php聽- line 118:
OC\AppFramework\Http\Dispatcher->dispatch(OC\Settings\ ... {},聽"check")

/[src-root]/lib/private/AppFramework/Routing/RouteActionHandler.php聽- line 47:
OC\AppFramework\App::main("OC\\Setting ... r",聽"check",聽OC\AppFramew ... {},聽{ _route: "s ... "})
OC\AppFramework\Routing\RouteActionHandler->__invoke({ _route: "s ... "})

/[src-root]/lib/private/Route/Router.php聽- line 297:
call_user_func(OC\AppFramew ... {},聽{ _route: "s ... "})/[src-root]/lib/base.php聽- line 987:
OC\Route\Router->match("/settings/ajax/checksetup")

/[src-root]/index.php聽- line 42:OC::handleRequest()

Browser log


Browser log

Browser log is not relevant, I access via caldav

Possible solution:
is it possible to check if the posix funciton posix_getuid (and others) is installed, and do a workaround if not?
Even in the cli tool the error exist. I mean this seems to be an optional check. and on many shared hosters the php posix plugin is not installed but nextcloud runs perfectly.

0. Needs triage bug

Most helpful comment

https://help.nextcloud.com/t/health-check-failing-and-repeating-posix-getuid-error/40788

Found the problem. It needed the php-process module installed.

All 3 comments

GitMate.io thinks possibly related issues are https://github.com/nextcloud/server/issues/8420 (NC13 - Call to undefined method OC_Defaults::replaceImagePath()), https://github.com/nextcloud/server/issues/4756 (Call to undefined method OCA\LookupServerConnector\BackgroundJobs\RetryJob::shouldRun()), https://github.com/nextcloud/server/issues/4319 (Call to undefined method OCP\Defaults::shouldReplaceIcons()), https://github.com/nextcloud/server/issues/6706 (Call to a member function getUID() on null), and https://github.com/nextcloud/server/issues/5059 (Undefined index: federationId).

Which Linux distro are you running?
Seeing this in CentOS right now, never had it on Ubuntu though.

https://help.nextcloud.com/t/health-check-failing-and-repeating-posix-getuid-error/40788

Found the problem. It needed the php-process module installed.

Was this page helpful?
0 / 5 - 0 ratings