浏览代码

Installer: Check for write-perms

1Day 3 年之前
父节点
当前提交
754dfc9dbf
共有 2 个文件被更改,包括 6 次插入1 次删除
  1. 4 1
      public/install/functions.php
  2. 2 0
      public/install/index.php

+ 4 - 1
public/install/functions.php

@@ -16,7 +16,10 @@ function checkPhpVersion()
     }
     return "not OK";
 }
-
+function checkWriteable()
+{
+    return is_writable("../../.env");
+}
 function checkHTTPS()
 {
     return

+ 2 - 0
public/install/index.php

@@ -65,6 +65,8 @@ if (!isset($_GET['step'])) {
         setup</p>
     <p class="<?php print(checkHTTPS() == true ? "ok" : "notok"); ?>">HTTPS is required</p>
 
+    <p class="<?php print(checkWriteable() == true ? "ok" : "notok"); ?>">Write-permissions on .env-file</p>
+
     <p class="<?php print(checkPhpVersion() === "OK" ? "ok" : "notok"); ?>"> php
         version: <?php echo phpversion(); ?> (required <?php echo $requirements["php"]; ?>)</p>
     <p class="<?php print(getMySQLVersion() === "OK" ? "ok" : "notok"); ?>"> mysql