Changeset View
Changeset View
Standalone View
Standalone View
src/applications/config/check/PhabricatorPHPPreflightSetupCheck.php
Show All 30 Lines | if (version_compare($version, 7, '>=') && | ||||
->setMessage($message) | ->setMessage($message) | ||||
->addLink( | ->addLink( | ||||
'https://phurl.io/u/php7', | 'https://phurl.io/u/php7', | ||||
pht('PHP 7 Compatibility Information')); | pht('PHP 7 Compatibility Information')); | ||||
return; | return; | ||||
} | } | ||||
// TODO: This can be removed entirely because the minimum PHP version is | |||||
// now PHP 5.5, which does not have safe mode. | |||||
$safe_mode = ini_get('safe_mode'); | |||||
if ($safe_mode) { | |||||
$message = pht( | |||||
"You have '%s' enabled in your PHP configuration, but this software ". | |||||
"will not run in safe mode. Safe mode has been deprecated in PHP 5.3 ". | |||||
"and removed in PHP 5.4.\n\nDisable safe mode to continue.", | |||||
'safe_mode'); | |||||
$this->newIssue('php.safe_mode') | |||||
->setIsFatal(true) | |||||
->setName(pht('Disable PHP %s', 'safe_mode')) | |||||
->setMessage($message) | |||||
->addPHPConfig('safe_mode'); | |||||
return; | |||||
} | |||||
// Check for `disable_functions` or `disable_classes`. Although it's | // Check for `disable_functions` or `disable_classes`. Although it's | ||||
// possible to disable a bunch of functions (say, `array_change_key_case()`) | // possible to disable a bunch of functions (say, `array_change_key_case()`) | ||||
// and classes and still have Phabricator work fine, it's unreasonably | // and classes and still have Phabricator work fine, it's unreasonably | ||||
// difficult for us to be sure we'll even survive setup if these options | // difficult for us to be sure we'll even survive setup if these options | ||||
// are enabled. Phabricator needs access to the most dangerous functions, | // are enabled. Phabricator needs access to the most dangerous functions, | ||||
// so there is no reasonable configuration value here which actually | // so there is no reasonable configuration value here which actually | ||||
// provides a benefit while guaranteeing Phabricator will run properly. | // provides a benefit while guaranteeing Phabricator will run properly. | ||||
▲ Show 20 Lines • Show All 85 Lines • Show Last 20 Lines |
Content licensed under Creative Commons Attribution-ShareAlike 4.0 (CC-BY-SA) unless otherwise noted; code licensed under Apache 2.0 or other open source licenses. · CC BY-SA 4.0 · Apache 2.0