Witam,
mam na stronce galerię MG2 od ponad roku. Wszystko było ok do pewnego czasu. Ostatnio pojawił się problem przy logowaniu do panela administracyjnego:
PERMISSION ERROR: Cannot write to 'pictures' folder!
Chmod your 'pictures' folder to 777
Login again
Sprawdziłem Chmod dla 'pictures' i jest ok, czyli 777 dlatego nie rozumiem błędu.
Po przeszukaniu plików php na serwerze znalazłem coś takiego w pliku english.php:
$mg2->lang['permerror2'] = "PERMISSION ERROR: Cannot write to 'pictures' folder!";
$mg2->lang['whattodo2'] = "Chmod your 'pictures' folder to 777";
oraz w pliku mg2admin_functions.php:
//POST LOGIN PEMISSIONS CHECK!!!
if($firstlogin == true) {
@rmdir("x");
if (@mkdir("x")) {
@rmdir("x");
} else {
$this->permcheck(1);
}
@rmdir("pictures/x/");
if (@mkdir("pictures/x/")) {
@rmdir("pictures/x/");
} else {
$this->permcheck(2);
}
if(!is_writable("mg2db_idatabase.php") && is_file("mg2db_idatabase.php")) $this->permcheck(3);
if(!is_writable("mg2db_idatabase_temp.php") && is_file("mg2db_idatabase_temp.php")) $this->permcheck(4);
if(!is_writable("mg2db_fdatabase.php") && is_file("mg2db_fdatabase.php")) $this->permcheck(5);
if(!is_writable("mg2db_fdatabase_temp.php") && is_file("mg2db_fdatabase_temp.php")) $this->permcheck(6);
}
}
function permcheck($level) {
if ($level == 1) { $errorcode = $this->lang["permerror1"];
$whattodo = $this->lang["whattodo1"]; }
if ($level == 2) { $errorcode = $this->lang["permerror2"];
$whattodo = $this->lang["whattodo2"]; }
if ($level == 3) { $errorcode = $this->lang["permerror3"];
$whattodo = $this->lang["whattodo3"]; }
if ($level == 4) { $errorcode = $this->lang["permerror4"];
$whattodo = $this->lang["whattodo4"]; }
if ($level == 5) { $errorcode = $this->lang["permerror5"];
$whattodo = $this->lang["whattodo5"]; }
if ($level == 6) { $errorcode = $this->lang["permerror6"];
$whattodo = $this->lang["whattodo6"]; }
?>
Co takiego się stało, że do tej pory było ok a teraz nie jest? czy może to być przyczyną nowszej wersji PHP na serwerze?
Za wszelką pomoc z góry dziękuję, pzd