- if (file_exists('tmp/cache/config.php')) {
- $ret = true;
- }
- }
- return $ret;
- }
- }
- private function _loadConfigFromCache() {
- if ($this->getMemcached()) {
- $memcacheD = new \Memcached();
- if ($memcacheD->addServer($this->getMemcached()->host, $this->getMemcached()->port)) {
- if ($memcacheD->get('controller_config_1') !== false and $memcacheD->get('controller_config_2') !== false) {
- CONTROLLER\CONFIG::setClasses($memcacheD->get('controller_config_1'));
- $this->_config = $memcacheD->get('controller_config_2');
- return false;
- }
- }
- } else {
- $config = file('tmp/cache/config.php');
- if (!is_array($config) or !isset($config[1])) {
- if (file_exists('/tmp/cache/config.php')) {
- unlink('/tmp/cache/config.php');
- }
- return false;
- }
- $decoded = urldecode($config[1]);
- try {
- $unserialized = unserialize($decoded);
- CONTROLLER\CONFIG::setClasses($unserialized);
- } catch (\Exception $e) {
- if (file_exists('/tmp/cache/config.php')) {
- unlink('/tmp/cache/config.php');
- }
- return false;
- // \CO\SYSTEM\HTTP\HEADER::redirect('/');
- }
- try {
- $this->_config = unserialize(urldecode($config[2]));
if (file_exists('tmp/cache/config.php')) { $ret = true; } } return $ret; } } private function _loadConfigFromCache() { if ($this->getMemcached()) { $memcacheD = new \Memcached(); if ($memcacheD->addServer($this->getMemcached()->host, $this->getMemcached()->port)) { if ($memcacheD->get('controller_config_1') !== false and $memcacheD->get('controller_config_2') !== false) { CONTROLLER\CONFIG::setClasses($memcacheD->get('controller_config_1')); $this->_config = $memcacheD->get('controller_config_2'); return false; } } } else { $config = file('tmp/cache/config.php'); if (!is_array($config) or !isset($config[1])) { if (file_exists('/tmp/cache/config.php')) { unlink('/tmp/cache/config.php'); } return false; } $decoded = urldecode($config[1]); try { $unserialized = unserialize($decoded); CONTROLLER\CONFIG::setClasses($unserialized); } catch (\Exception $e) { if (file_exists('/tmp/cache/config.php')) { unlink('/tmp/cache/config.php'); } return false; // \CO\SYSTEM\HTTP\HEADER::redirect('/'); } try { $this->_config = unserialize(urldecode($config[2]));
spl_autoload_register(array($this, '_autoload')); $this->_timer = new TIMER(); $this->_timer->add('CONTROLLER::init start'); // var_dump($this->_configLoadedFromCache()); if (php_sapi_name() !== 'cli') { ERROR::init(); } // if ($this->_useConfigCache()) { // $this->_loadConfigFromCache(); // if (CONTROLLER::getInstance() // ->getConfig() == NULL) { // die("A rendszer nincs konfigurálva."); // } // } else { // $this->_generateConfigFromConfigFile(); // $this->_storeConfigToCache(); // } $sapi = php_sapi_name(); if ($this->_useConfigCache() and $sapi != 'cli') { if ($this->_loadConfigFromCache() == false) { $this->_generateConfigFromConfigFile(); $this->_storeConfigToCache(); } // if (CONTROLLER::getInstance() // ->getConfig() == NULL) { // die("A rendszer nincs konfigurálva."); // } } else { $this->_generateConfigFromConfigFile(); if ($sapi !== 'cli') { $this->_storeConfigToCache(); } } RESPONSE::init(); REQUEST_HANDLER::init(); $this->_timer->add('CONTROLLER::init end'); $this->handleControllerOrModuleRedirects(); \CO\HELPER\POST::initByRawRequestBody(); }
<?php if (php_sapi_name() === 'cli') { define('ARGV1', isset($argv[1]) ? $argv[1] : ''); } require_once(__DIR__ .'/functions.php'); require_once(__DIR__ .'/controller/class/controller/controller.php'); require_once 'controller/class/domain/domain.php'; ini_set("session.cookie_domain", \CO\SYSTEM\DOMAIN::getDomainName(false, true)); $controller = new CO\SYSTEM\CONTROLLER(); //$controller->useMemcached('127.0.0.1', 11211); $controller->init(); \CO\HELPER\DATETIME::setTimezoneOffset('+01:00'); $controller->execute();
Key | Value |
requestParameters | cimke/koltsegvetes |
Key | Value |
REDIRECT_SCRIPT_URL | /cimke/koltsegvetes |
REDIRECT_SCRIPT_URI | https://vehir.hu/cimke/koltsegvetes |
REDIRECT_TMP | /var/www/clients/client1/web1/tmp |
REDIRECT_TMPDIR | /var/www/clients/client1/web1/tmp |
REDIRECT_TEMP | /var/www/clients/client1/web1/tmp |
REDIRECT_HTTPS | on |
REDIRECT_SSL_TLS_SNI | vehir.hu |
REDIRECT_STATUS | 200 |
SCRIPT_URL | /cimke/koltsegvetes |
SCRIPT_URI | https://vehir.hu/cimke/koltsegvetes |
TMP | /var/www/clients/client1/web1/tmp |
TMPDIR | /var/www/clients/client1/web1/tmp |
TEMP | /var/www/clients/client1/web1/tmp |
HTTPS | on |
SSL_TLS_SNI | vehir.hu |
HTTP_HOST | vehir.hu |
HTTP_CONNECTION | keep-alive |
HTTP_PRAGMA | no-cache |
HTTP_CACHE_CONTROL | no-cache |
HTTP_SEC_CH_UA | "HeadlessChrome";v="129", "Not=A?Brand";v="8", "Chromium";v="129" |
HTTP_SEC_CH_UA_MOBILE | ?0 |
HTTP_SEC_CH_UA_PLATFORM | "Windows" |
HTTP_UPGRADE_INSECURE_REQUESTS | 1 |
HTTP_USER_AGENT | Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com) |
HTTP_ACCEPT | text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,image/apng,*/*;q=0.8,application/signed-exchange;v=b3;q=0.7 |
HTTP_SEC_FETCH_SITE | none |
HTTP_SEC_FETCH_MODE | navigate |
HTTP_SEC_FETCH_USER | ?1 |
HTTP_SEC_FETCH_DEST | document |
HTTP_ACCEPT_ENCODING | gzip, deflate, br, zstd |
PATH | /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin |
SERVER_SIGNATURE | <address>Apache/2.4.18 (Ubuntu) Server at vehir.hu Port 443</address> |
SERVER_SOFTWARE | Apache/2.4.18 (Ubuntu) |
SERVER_NAME | vehir.hu |
SERVER_ADDR | 217.79.142.11 |
SERVER_PORT | 443 |
REMOTE_ADDR | 18.221.200.48 |
DOCUMENT_ROOT | /var/www/vehir.hu/web |
REQUEST_SCHEME | https |
CONTEXT_PREFIX | |
CONTEXT_DOCUMENT_ROOT | /var/www/vehir.hu/web |
SERVER_ADMIN | webmaster@vehir.hu |
SCRIPT_FILENAME | /var/www/vehir.hu/web/index.php |
REMOTE_PORT | 20042 |
REDIRECT_URL | /cimke/koltsegvetes |
REDIRECT_QUERY_STRING | requestParameters=cimke/koltsegvetes |
GATEWAY_INTERFACE | CGI/1.1 |
SERVER_PROTOCOL | HTTP/1.1 |
REQUEST_METHOD | GET |
QUERY_STRING | requestParameters=cimke/koltsegvetes |
REQUEST_URI | /cimke/koltsegvetes |
SCRIPT_NAME | /index.php |
PHP_SELF | /index.php |
REQUEST_TIME_FLOAT | 1743798149.981 |
REQUEST_TIME | 1743798149 |