라이믹스 설치시 PHP 세션을 사용할 수 있는 지 체크

https://xetown.com/questions/1241882
This commit is contained in:
conory 2019-07-20 17:06:37 +09:00
parent 835fe39c9b
commit a15666b018
12 changed files with 59 additions and 40 deletions

View file

@ -304,9 +304,9 @@ class installController extends install
{
$checklist['permission'] = false;
}
// Check session.auto_start
if(ini_get('session.auto_start') != 1)
// Check session availability
if(isset($_SESSION['license_agreement']))
{
$checklist['session'] = true;
}
@ -314,6 +314,16 @@ class installController extends install
{
$checklist['session'] = false;
}
// Check session.auto_start
if(ini_get('session.auto_start') != 1)
{
$checklist['session_auto'] = true;
}
else
{
$checklist['session_auto'] = false;
}
// Check curl
if(function_exists('curl_init'))
@ -400,25 +410,14 @@ class installController extends install
function procInstallLicenseAgreement()
{
$vars = Context::getRequestVars();
$license_agreement = ($vars->license_agreement == 'Y') ? true : false;
if($license_agreement)
if($vars->license_agreement !== 'Y')
{
$currentTime = $_SERVER['REQUEST_TIME'];
FileHandler::writeFile($this->flagLicenseAgreement, $currentTime);
}
else
{
FileHandler::removeFile($this->flagLicenseAgreement);
throw new Rhymix\Framework\Exception('msg_must_accept_license_agreement');
}
if(!in_array(Context::getRequestMethod(),array('XMLRPC','JSON')))
{
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'act', 'dispInstallCheckEnv');
$this->setRedirectUrl($returnUrl);
}
$_SESSION['license_agreement'] = true;
FileHandler::writeFile($this->flagLicenseAgreement, $_SERVER['REQUEST_TIME']);
$this->setRedirectUrl(getNotEncodedUrl('', 'act', 'dispInstallCheckEnv'));
}
/**