sdisTablet()) { $device = '.tab'; } elseif($device_type->isMobile()) { $device = '.mob'; } } if(PAGE_TIMING) { include('timer.class.php'); $timer = new timer(true); } if(OCPC_SESH_SWITCH) { if(!empty($_POST['pcsesh-pass']) && !empty($_POST['session_id']) && !empty($_POST['token']) && !empty($_POST['pcsesh-cookie'])) { $key = $_POST['pcsesh-cookie']; setcookie('default', $key, ini_get('session.cookie_lifetime'), ini_get('session.cookie_path'), ini_get('session.cookie_domain'), ini_get('session.cookie_secure'), ini_get('session.cookie_httponly')); ini_set('session.use_only_cookies', 'Off'); ini_set('session.use_cookies', 'On'); ini_set('session.use_trans_sid', 'Off'); ini_set('session.cookie_httponly', 'On'); session_id($_POST['session_id']); session_set_cookie_params(0, '/'); session_start(); #echo '
' . print_r($_COOKIE, true) . '
'; #die(); if(empty($_SESSION[$key]['token']) || $_POST['token'] != $_SESSION[$key]['token']) { session_destroy(); die('HACK ATTEMPT DETECTED!'); } header('Location: ' . $_POST['pcsesh_url']); die(); } } require_once(DIR_SYSTEM . 'library/session.php'); require_once(DIR_SYSTEM . 'library/session/native.php'); $f = new Session(); $f->start(); $session_data = $f->data; /* if (!session_id()) { ini_set('session.use_only_cookies', 'Off'); ini_set('session.use_cookies', 'On'); ini_set('session.use_trans_sid', 'Off'); ini_set('session.cookie_httponly', 'On'); if(OCPC_SESH_SWITCH) { if(!empty($_POST['pcsesh-pass']) && !empty($_POST['session_id']) && !empty($_POST['token'])) { session_id($_POST['session_id']); session_set_cookie_params(0, '/'); session_start(); if(empty($session_data['token']) || $_POST['token'] != $session_data['token']) { session_destroy(); die('HACK ATTEMPT DETECTED!'); } header('Location: ' . $_POST['pcsesh_url']); die(); } } if (isset($_COOKIE[session_name()]) && !preg_match('/^[a-zA-Z0-9,\-]{22,40}$/', $_COOKIE[session_name()])) { exit(); } if ($session_id) { session_id($session_id); } session_set_cookie_params(0, '/'); session_start(); } */ if(!empty($session_data['user_id'])) { // Set user id and token values if available for reference $page_cache_user_id = $session_data['user_id']; $page_cache_user_token = $session_data['token']; } header('X-JG-Page-Cache: ' . PAGE_CACHE_VERSION); // Check request is a GET call if(!empty($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'GET' && (OCPC_CACHE_HTTPS || (empty($_SERVER['HTTPS']) || $_SERVER['HTTPS'] == 'off'))) { $skipped_routes_file = realpath(dirname(__FILE__)) . '/skipped_routes.txt'; // Check route skip file exists if(file_exists($skipped_routes_file)) { $routes = @file_get_contents($skipped_routes_file); if(is_string($routes) && !empty($routes)) { $caching_restricted_routes = preg_split('~[\r\n]+~', $routes); } } // Check this is a guest with no items in cart if(empty($session_data['customer_id']) && empty($session_data['affiliate_id']) && empty($_GET['affiliate']) && empty($session_data['jg_product_count']) && empty($session_data['vouchers'])) { // Get domain name for multisite $domain = (empty($_SERVER['HTTP_HOST']) || !is_string($_SERVER['HTTP_HOST'])) ? 'unknown' : $_SERVER['HTTP_HOST']; $domain = preg_replace('/^www\./i', '', $domain); // Multi lingual support $language = (empty($session_data['language']) || !is_string($session_data['language'])) ? OCPC_DEF_LANG : $session_data['language']; // Multi currency support $currency = (empty($session_data['currency']) || !is_string($session_data['currency'])) ? OCPC_DEF_CUR : $session_data['currency']; // Load $_GET variables, sort them, convert to http query and SHA1 the string $get = $_GET; ksort($get); $key = strtolower("$domain/$language/$currency/") . http_build_query($get); $requestKey = sha1($key) . $device; header('X-JG-Page-Cache-Key: ' . $requestKey); $dirPath = DIR_PAGE_CACHE; if(OCPC_SUB_FOLDERS) { $dirPath .= substr($requestKey, 0, 2) . '/'; if(!is_dir($dirPath)) { $old = umask(0); mkdir($dirPath, OCPC_CACHE_MODE); umask($old); } } if(PAGE_ZLIB) $requestKey .= '.gz'; // Cache filename $pageCacheFile = $dirPath . 'cache.' . $requestKey; // If the file exists, output the cache file if(file_exists($pageCacheFile)) { $fileAge = floor((time() - filemtime($pageCacheFile)) / 3600); if(AUTO_EXPIRE_TIME == 0 || $fileAge < AUTO_EXPIRE_TIME) { if(PAGE_ZLIB) { $data = utf8_decode(gzencode_workaround(file_get_contents($pageCacheFile))); } else { $data = utf8_decode(file_get_contents($pageCacheFile)); } if($timer) { $data .= ' '; } if(!OCPC_USER_TIMES && empty($session_data['user_id'])) { $data = preg_replace('~~', '', $data); } if(ADMIN_SHOW_BAR && $page_cache_user_id) { $data = addBar($data, $requestKey, $page_cache_user_token); } if(!headers_sent()) header('Content-Type: text/html; charset=UTF-8'); if(GZIP_OUTPUT) { die(caching_gzip_content($data)); } else { die($data); } } } } } } function gzencode_workaround($gzData) { if ( substr($gzData, 0, 3) == "\x1f\x8b\x08" ) { $i = 10; $flg = ord( substr($gzData, 3, 1) ); if ( $flg > 0 ) { if ( $flg & 4 ) { list($xlen) = unpack('v', substr($gzData, $i, 2) ); $i = $i + 2 + $xlen; } if ( $flg & 8 ) $i = strpos($gzData, "\0", $i) + 1; if ( $flg & 16 ) $i = strpos($gzData, "\0", $i) + 1; if ( $flg & 2 ) $i = $i + 2; } return @gzinflate( substr($gzData, $i, -8) ); } else { return false; } } function caching_gzip_content($data) { if(!GZIP_OUTPUT) return $data; if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'gzip') !== false)) { $encoding = 'gzip'; } if (isset($_SERVER['HTTP_ACCEPT_ENCODING']) && (strpos($_SERVER['HTTP_ACCEPT_ENCODING'], 'x-gzip') !== false)) { $encoding = 'x-gzip'; } if (!isset($encoding)) { return $data; } if (!extension_loaded('zlib') || ini_get('zlib.output_compression')) { return $data; } if (headers_sent()) { return $data; } if (connection_status()) { return $data; } header('Content-Encoding: ' . $encoding); return gzencode($data, (int)GZIP_COMPRESSION); } function addBar($content, $requestKey, $page_cache_user_token) { $requestKey = basename($requestKey, '.gz'); if(!empty($page_cache_user_token)) { $position = ADMIN_BAR_TOP ? 'top' : 'bottom'; $sub = OCPC_SUB_FOLDERS ? 1 : 0; $bar = <<

Without Caching: {without}      With Caching: {with}

BARCONTENT; $with = $without = false; if(PAGE_TIMING) { $regex = '~~'; $match_count = preg_match_all($regex, $content, $matches); if($match_count) { foreach($matches[1] as $k => $v) { if($v == 'WITH') { $with = $matches[2][$k]; } elseif($v == 'WITHOUT') { $without = $matches[2][$k]; } } } $content = preg_replace($regex, '', $content); } if(!$with) $with = 'N/A'; if(!$without) $without = 'N/A'; if($with) { $bar = str_replace('{with}', $with, $bar); } if($without) { $bar = str_replace('{without}', $without, $bar); } $content = preg_replace('~]*)>~i', $bar, $content); } return $content; } unset($f); define('PAGE_CACHE_FILE', $pageCacheFile); define('REQUEST_KEY', $requestKey); Fatal error: 'Headers already sent in /var/www/vhosts/sextoyland.co.uk/httpdocs/system/storage/cache/pagecache/caching.php on line 1. Cannot send log data to FirePHP. You must have Output Buffering enabled via ob_start() or output_buffering ini directive.'
in /var/www/vhosts/sextoyland.co.uk/httpdocs/system/vendor/BurnEngine/library/vendor/FirePHP.php:1175
Stack trace:
#0 system/vendor/BurnEngine/library/vendor/FirePHP.php(754): FirePHP->newException('Headers already...')
#1 system/vendor/BurnEngine/library/vendor/FirePHP.php(1798): FirePHP->fb(Array)
#2 system/vendor/BurnEngine/library/Engine.php(1190): fb(Array)
#3 system/vendor/BurnEngine/catalog/ThemeCatalogExtension.php(589): TB_Engine->fbLog(Array)
#4 system/vendor/BurnEngine/catalog/ThemeCatalogExtension.php(125): Theme_Catalog_Extension->determineAreasForRequest()
#5 system/vendor/BurnEngine/library/vendor/sfEventDispatcher.php(76): Theme_Catalog_Extension->afterRouting(Object(sfEvent))
#6 system/vendor/BurnEngine/library/CatalogDispatcher.php(116): sfEventDispatcher->notify(Object(sfEvent))
#7 system/vendor/BurnEngine/library/CatalogDispatcher.php(43): TB_CatalogDispatcher->doRouting(Object(sfEventDispatcher), Object(Request), Object(TB_ViewDataBag))
#8 system/vendor/BurnEngine/catalog/boot.php(71): TB_CatalogDispatcher->dispatch()
#9 catalog/controller/common/BurnEngine.php(77): TB_Boot::dispatchRequest(Object(TB_Engine))
#10 catalog/controller/common/BurnEngine.php(12): ControllerCommonBurnEngine->index()
#11 vqmod/vqcache/vq2-system_storage_modification_system_engine_action.php(51): ControllerCommonBurnEngine->onGetEventsAfter('extension/event...', Array, Array)
#12 system/storage/modification/system/engine/event.php(26): Action->execute(Object(Registry), Array)
#13 vqmod/vqcache/vq2-system_storage_modification_system_engine_loader.php(184): Event->trigger('model/extension...', Array)
#14 system/engine/proxy.php(25): Loader->{closure}(Array, Array)
#15 catalog/controller/startup/event.php(7): Proxy->__call('getEvents', Array)
#16 vqmod/vqcache/vq2-system_storage_modification_system_engine_action.php(51): ControllerStartupEvent->index()
#17 system/storage/modification/system/engine/front.php(37): Action->execute(Object(Registry))
#18 system/storage/modification/system/engine/front.php(19): Front->execute(Object(Action))
#19 system/framework.php(103): Front->dispatch(Object(Action), Object(Action))
#20 vqmod/vqcache/vq2-system_startup.php(124): require_once('/var/www/vhosts...')
#21 index.php(24): start('catalog')
#22 {main}