Changeset View
Changeset View
Standalone View
Standalone View
support/init/init-script.php
| Show First 20 Lines • Show All 50 Lines • ▼ Show 20 Lines | $config_map = array( | ||||
| // "fork()" if "pcre.jit" is enabled. | // "fork()" if "pcre.jit" is enabled. | ||||
| 'pcre.jit' => 0, | 'pcre.jit' => 0, | ||||
| ); | ); | ||||
| foreach ($config_map as $config_key => $config_value) { | foreach ($config_map as $config_key => $config_value) { | ||||
| ini_set($config_key, $config_value); | ini_set($config_key, $config_value); | ||||
| } | } | ||||
| $php_version = phpversion(); | |||||
| $min_version = '5.5.0'; | |||||
| if (version_compare($php_version, $min_version, '<')) { | |||||
| echo sprintf( | |||||
| 'UPGRADE PHP: '. | |||||
| 'The installed version of PHP ("%s") is too old to run Arcanist. '. | |||||
| 'Update PHP to at least the minimum required version ("%s").', | |||||
| $php_version, | |||||
| $min_version); | |||||
| echo "\n"; | |||||
| exit(1); | |||||
| } | |||||
| if (!ini_get('date.timezone')) { | if (!ini_get('date.timezone')) { | ||||
| // If the timezone isn't set, PHP issues a warning whenever you try to parse | // If the timezone isn't set, PHP issues a warning whenever you try to parse | ||||
| // a date (like those from Git or Mercurial logs), even if the date contains | // a date (like those from Git or Mercurial logs), even if the date contains | ||||
| // timezone information (like "PST" or "-0700") which makes the | // timezone information (like "PST" or "-0700") which makes the | ||||
| // environmental timezone setting is completely irrelevant. We never rely on | // environmental timezone setting is completely irrelevant. We never rely on | ||||
| // the system timezone setting in any capacity, so prevent PHP from flipping | // the system timezone setting in any capacity, so prevent PHP from flipping | ||||
| // out by setting it to a safe default (UTC) if it isn't set to some other | // out by setting it to a safe default (UTC) if it isn't set to some other | ||||
| // value. | // value. | ||||
| Show All 35 Lines | |||||