Merge pull request #17843 from civicrm/5.28
[civicrm-core.git] / Civi / Install / Requirements.php
index 586a0c75d2de3c2d458e00a97740305cf567c7b1..d5f3d648ebf242cd23a90146144b54c63c8f7d18 100644 (file)
@@ -28,12 +28,15 @@ class Requirements {
    */
   protected $system_checks = [
     'checkMemory',
-    'checkServerVariables',
     'checkMysqlConnectExists',
     'checkJsonEncodeExists',
     'checkMultibyteExists',
   ];
 
+  protected $system_checks_web = [
+    'checkServerVariables',
+  ];
+
   protected $database_checks = [
     'checkMysqlConnection',
     'checkMysqlVersion',
@@ -83,6 +86,12 @@ class Requirements {
       $errors[] = $this->$check();
     }
 
+    if (PHP_SAPI !== 'cli') {
+      foreach ($this->system_checks_web as $check) {
+        $errors[] = $this->$check();
+      }
+    }
+
     return $errors;
   }