mirror of
https://github.com/silverstripe/silverstripe-installer
synced 2024-06-29 07:59:31 +02:00
If posix module is not enabled, just show a warning
git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/trunk@41577 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
parent
270ca68f41
commit
3702a09af1
29
install.php
29
install.php
|
@ -300,18 +300,23 @@ class InstallRequirements {
|
||||||
function requireWriteable($filename, $testDetails) {
|
function requireWriteable($filename, $testDetails) {
|
||||||
$this->testing($testDetails);
|
$this->testing($testDetails);
|
||||||
$filename = $this->getBaseDir() . $filename;
|
$filename = $this->getBaseDir() . $filename;
|
||||||
|
|
||||||
if(!is_writeable($filename)) {
|
if(function_exists('posix_getgroups')) {
|
||||||
$user = posix_getpwuid(posix_geteuid());
|
if(!is_writeable($filename)) {
|
||||||
$groups = posix_getgroups();
|
$user = posix_getpwuid(posix_geteuid());
|
||||||
foreach($groups as $group) {
|
$groups = posix_getgroups();
|
||||||
$groupInfo = posix_getgrgid($group);
|
foreach($groups as $group) {
|
||||||
$groupList[] = $groupInfo['name'];
|
$groupInfo = posix_getgrgid($group);
|
||||||
}
|
$groupList[] = $groupInfo['name'];
|
||||||
$groupList = "'" . implode("', '", $groupList) . "'";
|
}
|
||||||
|
$groupList = "'" . implode("', '", $groupList) . "'";
|
||||||
$testDetails[2] .= "User '$user[name]' needs to write be able to write to this file:\n$filename";
|
|
||||||
$this->error($testDetails);
|
$testDetails[2] .= "User '$user[name]' needs to write be able to write to this file:\n$filename";
|
||||||
|
$this->error($testDetails);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
$testDetails[2] .= "Unable to detect whether I can write to files. Please ensure $filename is writable.";
|
||||||
|
$this->warning($testDetails);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user