$function) { if (preg_match('/^pcntl_/', $function)) { unset($functions[$k]); } } if (!$functions) { $fatal = false; } } if ($fatal) { $message = pht( "You have '%s' enabled in your PHP configuration.\n\n". "This option is not compatible with this software. Remove ". "'%s' from your configuration to continue.", $disable_option, $disable_option); $this->newIssue('php.'.$disable_option) ->setIsFatal(true) ->setName(pht('Remove PHP %s', $disable_option)) ->setMessage($message) ->addPHPConfig($disable_option); } } } // Remove this check once Phorge requires PHP 8. mbstring.func_overload // got deprecated in PHP 7.2.0 and removed in PHP 8.0.0. $overload_option = 'mbstring.func_overload'; $func_overload = ini_get($overload_option); if ($func_overload) { $message = pht( "You have '%s' enabled in your PHP configuration.\n\n". 'This feature is "highly discouraged" by PHP\'s developers, and '. 'has been removed entirely in PHP8.'. "This option is not compatible with this software. Disable ". "'%s' in your PHP configuration to continue.", $overload_option, $overload_option); $this->newIssue('php'.$overload_option) ->setIsFatal(true) ->setName(pht('Disable PHP %s', $overload_option)) ->setMessage($message) ->addPHPConfig($overload_option); } $open_basedir = ini_get('open_basedir'); if ($open_basedir && strlen($open_basedir)) { // If `open_basedir` is set, just fatal. It's technically possible for // us to run with certain values of `open_basedir`, but: we can only // raise fatal errors from preflight steps, so we'd have to do this check // in two parts to support fatal and advisory versions; it's much simpler // to just fatal instead of trying to test all the different things we // may need to access in the filesystem; and use of this option seems // rare (particularly in supported environments). $message = pht( "Your server is configured with '%s', which prevents this software ". "from opening files it requires access to.\n\n". "Disable this setting to continue.", 'open_basedir'); $issue = $this->newIssue('php.open_basedir') ->setName(pht('Disable PHP %s', 'open_basedir')) ->addPHPConfig('open_basedir') ->setIsFatal(true) ->setMessage($message); } } }