From b53831101f39b15eb9d92fd4b037cf00c8d6b4f7 Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 4 Jul 2016 17:55:11 -0700 Subject: [PATCH] Raise explicit setup issues about PHP 7 Summary: Ref T9640. Fixes T9888. Decline to support PHP 7 until the async signal handling issue in T11270 is resolved. Test Plan: Faked local version, got helpful error message. Reviewers: chad Reviewed By: chad Maniphest Tasks: T9640, T9888 Differential Revision: https://secure.phabricator.com/D16231 --- .../check/PhabricatorPHPConfigSetupCheck.php | 17 +++++++++++++++++ src/docs/user/installation_guide.diviner | 3 ++- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/src/applications/config/check/PhabricatorPHPConfigSetupCheck.php b/src/applications/config/check/PhabricatorPHPConfigSetupCheck.php index 03bbb3c52d..6a08ec68ae 100644 --- a/src/applications/config/check/PhabricatorPHPConfigSetupCheck.php +++ b/src/applications/config/check/PhabricatorPHPConfigSetupCheck.php @@ -11,6 +11,23 @@ final class PhabricatorPHPConfigSetupCheck extends PhabricatorSetupCheck { } protected function executeChecks() { + if (version_compare(phpversion(), 7, '>=')) { + $message = pht( + 'This version of Phabricator does not support PHP 7. You '. + 'are running PHP %s.', + phpversion()); + + $this->newIssue('php.version7') + ->setIsFatal(true) + ->setName(pht('PHP 7 Not Supported')) + ->setMessage($message) + ->addLink( + 'https://phurl.io/u/php7', + pht('Phabricator PHP 7 Compatibility Information')); + + return; + } + $safe_mode = ini_get('safe_mode'); if ($safe_mode) { $message = pht( diff --git a/src/docs/user/installation_guide.diviner b/src/docs/user/installation_guide.diviner index 8feb8ae1d0..749ca9a63d 100644 --- a/src/docs/user/installation_guide.diviner +++ b/src/docs/user/installation_guide.diviner @@ -70,7 +70,8 @@ Beyond an operating system, you will need **a webserver**. You will also need: - **MySQL**: You need MySQL. We strongly recommend MySQL 5.5 or newer. - - **PHP**: You need PHP 5.2 or newer. + - **PHP**: You need PHP 5.2 or newer, but note that PHP 7 is + **not supported**. You'll probably also need a **domain name**. In particular, you should read this note: