403Webshell
Server IP : 85.158.181.41  /  Your IP : 216.73.217.12
Web Server : Apache
System : Linux cloud9-vm129 6.1.178+1-ph #ph SMP PREEMPT_DYNAMIC Wed Jul 29 09:00:54 UTC 2026 x86_64
User : moncbefd ( 1024)
PHP Version : 7.3.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/moncbefd/www.moneta.at/includes/functions/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/moncbefd/www.moneta.at/includes/functions/gm_set_session_parameters.inc.php
<?php
/* --------------------------------------------------------------
   gm_set_session_parameters.inc.php 2019-02-22
   Gambio GmbH
   http://www.gambio.de
   Copyright (c) 2019 Gambio GmbH
   Released under the GNU General Public License (Version 2)
   [http://www.gnu.org/licenses/gpl-2.0.html]
   --------------------------------------------------------------
*/

require DIR_FS_CATALOG . 'includes/functions/gm_get_session_name_postfix.inc.php';

function gm_set_session_parameters()
{
    $sessionStatus = session_status();
    if ($sessionStatus === PHP_SESSION_DISABLED) {
        throw new RuntimeException('PHP sessions MUST be enabled!');
    } elseif ($sessionStatus === PHP_SESSION_ACTIVE) {
        return;
    }
    $tlsEnabled = (defined('ENABLE_SSL') && is_bool(constant('ENABLE_SSL')) && constant('ENABLE_SSL') === true) ||
                  (defined('ENABLE_SSL_CATALOG') && is_string(constant('ENABLE_SSL_CATALOG')) && strtolower(constant('ENABLE_SSL_CATALOG')) === 'true');
    
    @ini_set('session.gc_maxlifetime', defined('SESSION_GC_MAXLIFETIME') ? (int)SESSION_GC_MAXLIFETIME : 1440);
    @ini_set('session.gc_probability', defined('SESSION_GC_PROBABILITY') ? (int)SESSION_GC_PROBABILITY : 100);
    @ini_set('session.gc_divisor', defined('SESSION_GC_DIVISOR') ? (int)SESSION_GC_DIVISOR : 1000);
    @ini_set('session.use_trans_sid', false);
    @ini_set('session.use_strict_mode', true);
    @ini_set('session.use_only_cookies', true);
    
    $shopHost = parse_url(GM_HTTP_SERVER, PHP_URL_HOST);
    !empty($shopHost) or die('Empty host detected!');
    $shopHostParts = explode('.', $shopHost);
    if (count($shopHostParts) > 1 && $shopHostParts[0] === 'www') {
        unset($shopHostParts[0]);
    }
    $shopHost = implode('.', $shopHostParts);
    $path = (string)@constant('DIR_WS_CATALOG');
    !empty($path) or die('Empty path detected!');
    session_set_cookie_params(0, $path, $shopHost, $tlsEnabled, true);
    session_name('GXsid_' . gm_get_session_name_postfix());
    
    if (defined('SESSION_SAVE_HANDLER') && defined('SESSION_SAVE_PATH')) {
        @ini_set('session.save_handler', SESSION_SAVE_HANDLER);
        session_save_path(SESSION_SAVE_PATH);
    } else {
        @ini_set('session.save_handler', 'files');
        session_save_path(DIR_FS_CATALOG . 'cache/sessions/');
    }
    
    $sessionHandlerClass =
        (defined('SESSION_USERSPACE_HANDLER') && class_exists(SESSION_USERSPACE_HANDLER)) ?
        SESSION_USERSPACE_HANDLER :
        null;
    
    if (!empty($sessionHandlerClass)) {
        /** @var \SessionHandlerInterface $sessionHandler */
        $sessionHandler = MainFactory::create($sessionHandlerClass);
        session_set_save_handler($sessionHandler, true);
    }
}


Youez - 2016 - github.com/yon3zu
LinuXploit