1. Find your php.ini file.
2. Uncomment extension=php_curl
Restart web server.

If you don't want this then disable paypal & use_captcha in config.php."); } if ($config['use_captcha'] && !extension_loaded('openssl')) { die("php openSSL is not enabled. It is required to for captcha services.
1. Find your php.ini file.
2. Uncomment extension=php_openssl
Restart web server.

If you don't want this then disable use_captcha in config.php."); } // References ( & ) works as an alias for a variable, // they point to the same memmory, instead of duplicating it. if (!isset($config['TFSVersion'])) $config['TFSVersion'] = &$config['ServerEngine']; if (!isset($config['ServerEngine'])) $config['ServerEngine'] = &$config['TFSVersion']; $config['ServerEngineReal'] = $config['ServerEngine']; if (in_array($config['ServerEngineReal'], array('TFS_16', 'CANARY', 'BLACKTEK'), true)) { $config['ServerEngine'] = 'TFS_10'; $config['TFSVersion'] = 'TFS_10'; } if ($config['ServerEngineReal'] === 'CANARY') { $config['twoFactorAuthenticator'] = false; } if (PHP_SAPI !== 'cli' && !is_file(__DIR__ . '/../config.local.php') && !is_file(__DIR__ . '/../install/installed.lock') && is_file(__DIR__ . '/../install/index.php') ) { $znoteRoot = str_replace('\\', '/', (string)realpath(__DIR__ . '/..')); $scriptDir = str_replace('\\', '/', (string)realpath(dirname((string)($_SERVER['SCRIPT_FILENAME'] ?? '')))); $depth = 0; if ($znoteRoot !== '' && $scriptDir !== '' && strpos($scriptDir . '/', $znoteRoot . '/') === 0) { $below = trim(substr($scriptDir, strlen($znoteRoot)), '/'); $depth = ($below === '') ? 0 : count(explode('/', $below)); } $segments = array_values(array_filter(explode('/', str_replace('\\', '/', dirname((string)($_SERVER['SCRIPT_NAME'] ?? '')))), 'strlen')); if ($depth > 0) { $segments = array_slice($segments, 0, max(0, count($segments) - $depth)); } header('Location: ' . ($segments ? '/' . implode('/', $segments) : '') . '/install/'); exit; } require_once 'database/connect.php'; require_once 'function/general.php'; require_once 'function/translate.php'; require_once 'function/bbcode.php'; require_once 'function/users.php'; require_once 'function/cache.php'; require_once 'function/downloads.php'; require_once 'function/mail.php'; require_once 'function/token.php'; require_once 'function/rfc6238.php'; require_once 'function/twofa2.php'; require_once __DIR__ . '/adapter/ServerAdapterInterface.php'; require_once __DIR__ . '/adapter/TFSAdapter.php'; require_once __DIR__ . '/adapter/CanaryAdapter.php'; require_once __DIR__ . '/adapter/OtHireAdapter.php'; require_once __DIR__ . '/adapter/BlackTekAdapter.php'; require_once __DIR__ . '/adapter/factory.php'; require_once 'function/itemparser/itemlistparser.php'; require_once 'function/settings.php'; require_once 'function/migrations.php'; require_once 'function/backups.php'; require_once 'function/health.php'; require_once 'function/login_guard.php'; require_once 'function/adminlog.php'; require_once 'function/updater.php'; require_once 'function/theme.php'; require_once 'function/menus.php'; require_once 'function/landing.php'; require_once 'function/minimap.php'; require_once 'function/serverdata.php'; require_once 'function/serverdata_overrides.php'; require_once 'function/plugins.php'; require_once 'function/scheduler.php'; require_once 'function/plugin_settings.php'; require_once 'function/loginwebservice.php'; require_once 'function/payments.php'; // Settings saved from the admin panel override the values in config.php. znote_apply_settings(); znote_security_boot((array)($config['security'] ?? array())); // Local item-image passthrough: when $config['shop']['imageServer'] points at a // disk folder, serve /. straight from PHP. Placed // after znote_apply_settings() so the admin-panel value wins over config.php. if (isset($_GET['znote_item_img'])) { while (ob_get_level() > 0) ob_end_clean(); $zii_id = (int) $_GET['znote_item_img']; $zii_dir = function_exists('znote_item_image_dir') ? znote_item_image_dir() : ''; if ($zii_dir === '' || $zii_id <= 0) { http_response_code(404); exit; } $zii_cfg = strtolower(preg_replace('/[^a-z0-9]/i', '', (string) ($config['shop']['imageType'] ?? ''))); $zii_exts = array_values(array_unique(array_filter(array_merge(array($zii_cfg), array('png', 'gif', 'jpg', 'jpeg', 'webp'))))); $zii_file = ''; foreach ($zii_exts as $zii_e) { $zii_p = $zii_dir . DIRECTORY_SEPARATOR . $zii_id . '.' . $zii_e; if (is_file($zii_p)) { $zii_file = $zii_p; break; } } $zii_real = $zii_file !== '' ? realpath($zii_file) : false; if ($zii_real === false || strncmp($zii_real, $zii_dir, strlen($zii_dir)) !== 0) { http_response_code(404); exit; } $zii_mime = array('png' => 'image/png', 'gif' => 'image/gif', 'jpg' => 'image/jpeg', 'jpeg' => 'image/jpeg', 'webp' => 'image/webp'); $zii_x = strtolower(pathinfo($zii_real, PATHINFO_EXTENSION)); header('Content-Type: ' . ($zii_mime[$zii_x] ?? 'application/octet-stream')); header('Content-Length: ' . (string) filesize($zii_real)); header('Cache-Control: public, max-age=86400'); header('X-Content-Type-Options: nosniff'); readfile($zii_real); exit; } // Enabled plugins register their hooks here, once the database and settings // are available and before any page has done anything. znote_plugins_load(); // The active theme's own config file (defines $follow, the countdown, ...). // Loaded here, at global scope, so shells, menus, widgets and views all see // those variables through $GLOBALS. $themeConfigFile = theme_file('layout_config.php'); if ($themeConfigFile !== null) { require_once $themeConfigFile; } if (!isset($_SESSION['token'])) { Token::generate(); } if (user_logged_in() === true && znote2fa_v2_enabled()) { $currentTwoFactorSessionVersion = znote2fa_session_version((int)getSession('user_id')); $sessionTwoFactorVersion = (int)($_SESSION['tfa2_sv'] ?? 1); if ($sessionTwoFactorVersion !== $currentTwoFactorSessionVersion) { // "Log out all devices" bumped the version stored for this account: this // session was minted before that and no longer counts as logged in. znote_session_destroy(); } else { // Adopt sessions created before 2FA v2 existed. Treating their version as // one means a later logout-all still invalidates them correctly. $_SESSION['tfa2_sv'] = $currentTwoFactorSessionVersion; } } if (user_logged_in() === true) { $session_user_id = (int)getSession('user_id'); $user_data = user_data($session_user_id, 'id', 'name', 'password', 'email', 'premium_ends_at'); if (!is_array($user_data)) $user_data = array(); $user_data += array('id' => 0, 'name' => '', 'password' => '', 'email' => '', 'premium_ends_at' => 0); $premiumLeft = (int)$user_data['premium_ends_at'] - time(); $user_data['premdays'] = ($premiumLeft > 0) ? floor($premiumLeft / 86400) : 0; $user_znote_data = user_znote_account_data($session_user_id, 'ip', 'created', 'points', 'cooldown', 'flag' ,'active_email'); if (!is_array($user_znote_data)) $user_znote_data = array(); $user_znote_data += array('ip' => 0, 'created' => 0, 'points' => 0, 'cooldown' => 0, 'flag' => '', 'active_email' => 0); } // --------------------------------------------------------------------------- // Maintenance mode // // Checked here, after the session is up, so is_admin() is available: an admin // browsing a closed site sees it normally and can keep working. Everyone else // gets the message and nothing else - no queries, no layout, no theme. // --------------------------------------------------------------------------- $updateMaintenance = is_file(__DIR__ . '/update/maintenance.lock'); if (!empty($config['maintenance']) || $updateMaintenance) { $maintenanceAdmin = (user_logged_in() === true) && isset($user_data) && is_admin($user_data); // The admin panel is always reachable, otherwise you could lock yourself // out of the switch that turns this off. $maintenanceScript = basename($_SERVER['SCRIPT_NAME'] ?? ''); $maintenanceExempt = in_array($maintenanceScript, array('login.php', 'logout.php'), true) || strpos((string)($_SERVER['SCRIPT_NAME'] ?? ''), '/admin/') !== false; if (!$maintenanceAdmin && !$maintenanceExempt) { http_response_code(503); header('Retry-After: 3600'); ?> <?= htmlspecialchars($config['site_title'], ENT_QUOTES, 'UTF-8') ?> execute("DELETE FROM znote_visitors_details WHERE time <= ?", [$timef]); setCache($time); } } $visitor_data = znote_visitors_get_data(); znote_visitor_set_data($visitor_data); // update or insert data znote_visitor_insert_detailed_data(0); // detailed data $visitor_detailed = znote_visitors_get_detailed_data($visitor_config['time_period']); // max activity $v_activity = 0; $v_register = 0; $v_highscore = 0; $v_c_char = 0; $v_s_char = 0; $v_form = 0; foreach ((array)$visitor_detailed as $v_d) { // Activity if ($v_d['ip'] == getIPLong()) { // count each type of visit switch ($v_d['type']) { case 0: // max activity $v_activity++; break; case 1: // account registered $v_register++; $v_form++; break; case 2: // character creations $v_c_char++; $v_form++; break; case 3: // Highscore fetched $v_highscore++; $v_form++; break; case 4: // character searched $v_s_char++; $v_form++; break; case 5: // Other forms (login.?) $v_form++; break; } } } // Deny access if activity is too high if ($v_activity > $visitor_config['max_activity']) die("Chill down. Your web activity is too big. max_activity"); if ($v_register > $visitor_config['max_account']) die("Chill down. You can't create multiple accounts that fast. max_account"); if ($v_c_char > $visitor_config['max_character']) die("Chill down. Your web activity is too big. max_character"); if ($v_form > $visitor_config['max_post']) die("Chill down. Your web activity is too big. max_post"); //var_dump($v_activity, $v_register, $v_highscore, $v_c_char, $v_s_char, $v_form); //echo ' <--- IP logging activity past 10 seconds.'; } // Sub page override system $filename = explode('/', $_SERVER['SCRIPT_NAME']); $filename = $filename[count($filename) - 1]; $page_filename = str_replace('.php', '', $filename); if ($config['allowSubPages']) { $subFile = theme_file('sub.php'); if ($subFile !== null) require_once $subFile; if (isset($subpages) && !empty($subpages)) { foreach ($subpages as $page) { if ($page['override'] && $page['file'] === $filename) { theme_open(); $subPage = theme_file('sub/'.$page['file']); if ($subPage !== null) require_once $subPage; theme_close(); exit; } } } else { ?>

Old layout!

The layout is running an outdated sub system which is not compatible with this version of Znote AAC.

The file layouts/<theme>/sub.php is outdated.
Please update it to look like THIS. (ZnoteX: layouts/https://github.com/Znote/ZnoteAAC/blob/master/layout/sub.phplt;themehttps://github.com/Znote/ZnoteAAC/blob/master/layout/sub.phpgt;/sub.php)THIS.