Account Settings File could not be created successfully"; echo json_encode($resp); exit(); } else { $serverAddr = getEVSServerAddr(); //Getting EVS server address if("" == $proxyIP) { $proxyData = ""; } else { $proxyData = (($proxyUser != "")?urlencode($proxyUser):"").":".(($proxyPwd != "")?urlencode($proxyPwd):"")."@".($proxyIP).":".($proxyPort); } $accountSettingData['userName'] = $userName; # url decode is required to handle HTML encoded characters in password $accountSettingData['password'] = $password; $accountSettingData['encType'] = $encType; $accountSettingData['serverAddr'] = $serverAddr; $accountSettingData['PROXY'] = $proxyData; $accountSettingData['engineCount'] = $_SESSION['multipleEngineEnable']; $accountSettingData['isSubAccount'] = $_SESSION['isSubAccount']; $accountSettingData['userAccountStatus'] = "active"; fwrite($file, json_encode($accountSettingData,TRUE)); fclose($file); @chmod($accountSettingPath, $permissionVal); } #unset($_SESSION['password']); /* Creating Default Backup/Restore Locations - Start */ if(!file_exists($mpc)) update_mpc(); if(!file_exists($drlFile)) createRestoreLocationFile(); $localManualDir = Scheduler::$localbackup_dir."+ManualTask"; $localStartPidfilePath = "$localManualDir/".START_PID; if(!isJobRunning($localStartPidfilePath)){ @unlink("$localManualDir/".BACKUPSETFILEDISPLAY); } $backupManualDir = Scheduler::$backup_dir."+ManualTask"; $backupStartPidfilePath = "$backupManualDir/".START_PID; if(!isJobRunning($backupStartPidfilePath)){ @unlink("$backupManualDir/".BACKUPSETFILEDISPLAY); } $restoreManualDir = Scheduler::$restore_dir."+ManualTask"; $restoreStartPidfilePath = "$restoreManualDir/".START_PID; if(!isJobRunning($restoreStartPidfilePath)) @unlink("$restoreManualDir/".RESTORESETFILEDISPLAY); /* Creating Default Backup/Restore Locations - End */ isRootLevelDisplayEnabled(); clearPidsAndCancelJob(); //Remove the pids if the job is not running killSizeFd(); //Killing the getSize process $dedup = false; $deviceIDExists = false; $deviceCount = 0; $listfail = FALSE; if(isset($_SESSION['dedup']) && $_SESSION['dedup']){ $listop = getDedupDeviceList(); if(!$listop[0]) { $listfail = TRUE; } $dedup = true; $deviceIDExists = deviceIDExists(); if(isset($_SESSION['deviceList'])) $deviceCount = count($_SESSION['deviceList']); } if($listfail) { $resp = array(FALSE, UNABLE_TO_CONNECT_EVS_SERVER); } else { $message = ACCOUNT_SET_SUCC; $_SESSION['configType'] = false; $resp = array(TRUE, $message, FALSE, $dedup, $deviceCount, $deviceIDExists); } # //$_SESSION['validUser'] = true; echo json_encode($resp); exit(); } else { $resp[] = false; $resp[] = false; echo json_encode($resp); exit(); } ?>