From 1f015523257ebd03ffdc69cd4764d73bf8b21768 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Thomas=20M=C3=BCller?= <thomas.mueller@tmit.eu>
Date: Mon, 12 Jan 2015 20:17:02 +0100
Subject: [PATCH] Check for the posix extension - refs
 https://github.com/owncloud/core/pull/13282#issuecomment-69602645

---
 console.php | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/console.php b/console.php
index f6fba14b7f..6d3ab20bc1 100644
--- a/console.php
+++ b/console.php
@@ -23,6 +23,10 @@ try {
 	}
 
 	if (!OC_Util::runningOnWindows())  {
+		if (!function_exists('posix_getuid')) {
+			echo "The posix extensions are required - see http://php.net/manual/en/book.posix.php" . PHP_EOL;
+			exit(0);
+		}
 		$user = posix_getpwuid(posix_getuid());
 		$configUser = posix_getpwuid(fileowner(OC::$SERVERROOT . '/config/config.php'));
 		if ($user['name'] !== $configUser['name']) {
-- 
GitLab