From 3c33e1b36f0cd5d9b099a5f872cf96df6b14275f Mon Sep 17 00:00:00 2001 From: iAmShorty Date: Sat, 8 Mar 2014 11:11:09 +0100 Subject: [PATCH] [CHANGE] issue #1905 --- public/include/admin_checks.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/include/admin_checks.php b/public/include/admin_checks.php index b10e9dfa..98ecbbb2 100644 --- a/public/include/admin_checks.php +++ b/public/include/admin_checks.php @@ -9,7 +9,7 @@ if (@$_SESSION['USERDATA']['is_admin'] && $user->isAdmin(@$_SESSION['USERDATA'][ // setup some basic stuff for checking - getuid/getpwuid not available on mac/windows $apache_user = 'unknown'; - if (substr_count(strtolower(PHP_OS), 'nix') > 0) { + if (substr_count(strtolower(PHP_OS), 'nix') > 0 || substr_count(strtolower(PHP_OS), 'linux') > 0) { $apache_user = (function_exists('posix_getuid')) ? posix_getuid() : 'unknown'; $apache_user = (function_exists('posix_getpwuid')) ? posix_getpwuid($apache_user) : $apache_user; } @@ -100,7 +100,7 @@ if (@$_SESSION['USERDATA']['is_admin'] && $user->isAdmin(@$_SESSION['USERDATA'][ if ($socket !== false) { $address = @gethostbyname($config['gettingstarted']['stratumurl']); $result = @socket_connect($socket, $address, $config['gettingstarted']['stratumport']); - if ($result !== 1) { + if ($result !== true) { $enotice[] = "We tried to poke your Stratum server using config->gettingstarted details but it didn't respond"; } $close = @socket_close($socket);