Boot System Requirements
By: fruffl | Date: Jan 25 2010 21:22 | Format: PHP | Expires: never | Size: 7.24 KB | Hits: 1079
- <?php
- FINAL CLASS ILLI_SequenceBoot_LinkSystem_SegmentRequirements EXTENDS ILLI_SequenceBoot_LinkSystem_Segment
- {
- private $serverIni = 'server.availableness.ini';
- public function init()
- {
- $this->serverIni = $this->_root->Boot->System->Registry->get()->CORE_DIR->CACHE.DIRECTORY_SEPARATOR.$this->serverIni;
- ? $this->loadIniFile()
- : $this->createIniFile();
- }
- public function run()
- {
- if($this->_root->getApplicationTest())
- $this->createIniFile();
- }
- private function loadIniFile()
- {
- $INI = $this->_root->Boot->System->Loader->ini($this->serverIni);
- {
- $this->createIniFile();
- return;
- }
- foreach($INI->AVAILABLENESS as $key => $value)
- $this->_root->Boot->System->Registry->add('AVAILABLENESS', $key, $value);
- }
- private function createIniFile()
- {
- $ini = '; DONT EDIT THIS FILE!';
- $ini .= "n".'; some server-settings to bypass the detections at every request.';
- $ini .= "n".'; TO UPDATE VALUES DELETE THIS FILE.';
- $ini .= "n".'[AVAILABLENESS]';
- $this->checkAvailableness();
- foreach($this->_root->Boot->System->Registry->get()->AVAILABLENESS as $key => $value)
- {
- if($value === NULL || $value === '')
- $value = 'NULL';
- if($value === 0 || $value === false)
- $value = 'FALSE';
- if($value === 1 || $value === true)
- $value = 'TRUE';
- }
- }
- private function checkAvailableness()
- {
- function parsePHPModules()
- {
- {
- foreach ($vTmp2 AS $vOne)
- {
- $vPat = '<info>([^<]+)</info>';
- $vPat3 = "/$vPats*$vPats*$vPat/";
- $vPat2 = "/$vPats*$vPat/";
- else
- }
- }
- return $vModules;
- }
- function parseApacheModules()
- {
- $input = parsePHPModules();
- {
- $modules = $input['apache']['Loaded Modules'];
- foreach($mod_list as $key=>$value)
- return $mod_list;
- }
- else
- {
- $modules = $input['apache2handler']['Loaded Modules'];
- foreach($mod_list as $key=>$value)
- return $mod_list;
- }
- }
- $REGISTRY = $this->_root->Boot->System->Registry;
- $REGISTRY
- -> add('AVAILABLENESS', 'CHECK_SAFEMODE',
- -> add('AVAILABLENESS', 'CHECK_CURL',
- -> add('AVAILABLENESS', 'CHECK_URLFOPEN',
- -> add('AVAILABLENESS', 'CHECK_ZENDENGINE1_COMPATIBILITY',
- -> add('AVAILABLENESS', 'CHECK_FTP',
- -> add('AVAILABLENESS', 'CHECK_FILEUPLOADS',
- -> add('AVAILABLENESS', 'CHECK_MYSQ',
- -> add('AVAILABLENESS', 'CHECK_PGSQL',
- -> add('AVAILABLENESS', 'CHECK_IMAP',
- -> add('AVAILABLENESS', 'CHECK_GD',
- -> add('AVAILABLENESS', 'CHECK_ZLIB',
- -> add('AVAILABLENESS', 'CHECK_PSPELL',
- -> add('AVAILABLENESS', 'CHECK_FSOCKOPEN',
- -> add('AVAILABLENESS', 'CHECK_SIMPLEXML',
- -> add('AVAILABLENESS', 'CHECK_SOAP',
- -> add('AVAILABLENESS', 'CHECK_MCRYPT',
- -> add('AVAILABLENESS', 'CHECK_SESSION_AUTOSTART',
- -> add('AVAILABLENESS', 'CHECK_SESSION_DIR',
- -> add('AVAILABLENESS', 'CHECK_SESSION_REFERER_CHECK_CORRECT',
- -> add('AVAILABLENESS', 'CHECK_SESSION_CHECK',
- -> add('AVAILABLENESS', 'CHECK_PHP_SAPI',
- -> add('AVAILABLENESS', 'CHECK_CGI_MODE',
- -> add('AVAILABLENESS', 'CHECK_BASEDIR_OK',
- {
- $REGISTRY
- -> add('AVAILABLENESS', 'CHECK_MOD_REWRITE_AVAILABLE',
- -> add('AVAILABLENESS', 'CHECK_MOD_SECURITY_ENABLED',
- }
- else
- {
- $REGISTRY
- -> add('AVAILABLENESS', 'CHECK_MOD_REWRITE_AVAILABLE',
- NULL)
- -> add('AVAILABLENESS', 'CHECK_MOD_SECURITY_ENABLED',
- NULL);
- }
- $remoteAccess = FALSE;
- if($REGISTRY->get()->AVAILABLENESS->CHECK_CURL)
- {
- $remoteAccess = TRUE;
- }
- else
- if($REGISTRY->get()->AVAILABLENESS->CHECK_URLFOPEN)
- {
- $remoteAccess = TRUE;
- }
- $REGISTRY
- -> add('AVAILABLENESS', 'CHECK_REMOTE_ACCESS',
- $remoteAccess);
- }
- }
Latest pastes
1 hours ago
11 hours ago
1 days ago
2 days ago
2 days ago