Пример #1
0
function GoDaddy_linux_instructions($html_dir)
{
    $base = get_base_address();
    $loader_name = get_loader_name();
    $zend_extension_line = "<code>zend_extension = {$html_dir}/ioncube/{$loader_name}</code>";
    $php_ini_name = is_php_version_or_greater(5, 0) ? 'php5.ini' : 'php.ini';
    $ini_path = $html_dir . '/' . $php_ini_name;
    $instr = array();
    $instr[] = 'In your html directory, ' . $html_dir . ', create a sub-directory called <b>ioncube</b>.';
    if (@file_exists($ini_path)) {
        $instr[] = "Edit the {$php_ini_name} in your  {$html_dir} and add the following line to the <b>top</b> of the file:<br>" . $zend_extension_line;
    } else {
        $instr[] = "<a href=\"{$base}&amp;page=phpconfig&amp;ininame={$php_ini_name}&amp;stype=s&amp;download=1&amp;prepend=1\">Save this {$php_ini_name} file</a> and upload it to your html directory, {$html_dir}";
    }
    $instr[] = 'Download the <a target="_blank" href="http://downloads2.ioncube.com/loader_downloads/ioncube_loaders_lin_x86.zip">Linux ionCube Loaders</a>.';
    $instr[] = 'Unzip the loaders and upload them into the ioncube directory you created previously.';
    $instr[] = 'The encoded files should now be working.';
    echo '<div class=panel>';
    echo make_list($instr);
    echo '</div>';
}
Пример #2
0
function run()
{
    unregister_globals();
    ini_set('session.cache_expire', 1);
    if (is_php_version_or_greater(4, 3, 0)) {
        ini_set('session.use_only_cookies', 1);
    }
    ini_set('session.cookie_lifetime', 1);
    @session_start();
    if (!isset($_SESSION['CREATED'])) {
        $_SESSION['CREATED'] = time();
    } elseif (time() - $_SESSION['CREATED'] > SESSION_LIFETIME_MINUTES * 60) {
        session_destroy();
        $_SESSION = array();
    }
    if (!isset($_SERVER)) {
        $_SERVER =& $HTTP_SERVER_VARS;
    }
    php_sapi_name() == 'cli' && die("This script should only be run by a web server.\n");
    $page = get_request_parameter('page');
    $host = get_request_parameter('host');
    $clear = get_request_parameter('clear');
    if (!empty($host)) {
        if ($host == 'ngd') {
            $_SESSION['not_go_daddy'] = 1;
        }
    }
    if (!empty($clear)) {
        unset($_SESSION['not_go_daddy']);
        unset($_SESSION['latest_version']);
        unset($_SESSION['loader_platform_info']);
        unset($_SESSION['loader_version_info']);
        unset($_SESSION['php_compilers_info']);
    }
    if (!array_key_exists('latest_version', $_SESSION) || !isset($_SESSION['latest_version']) || $_SESSION['latest_version'] === false) {
        $_SESSION['latest_version'] = retrieve_latest_version();
    }
    if (!empty($page)) {
        $fn = "{$page}_page";
        if (function_exists($fn)) {
            $fn();
        } else {
            default_page();
        }
    } else {
        $godaddy_root = GoDaddy_root();
        if (empty($godaddy_root)) {
            default_page();
        } else {
            GoDaddy_page($godaddy_root);
        }
    }
    @session_write_close();
    exit(0);
}
Пример #3
0
function run()
{
    unregister_globals();
    if (is_php_version_or_greater(4,3,0)) {
        ini_set('session.use_only_cookies',1);
    }
    @session_start();
    if (!isset($_SESSION['CREATED'])) {
        $_SESSION['CREATED'] = time();
    } elseif (time() - $_SESSION['CREATED'] > SESSION_LIFETIME_MINUTES * 60) {
        $persist['not_go_daddy'] = empty($_SESSION['not_go_daddy'])?0:1;
        $persist['use_ini_method'] = empty($_SESSION['use_ini_method'])?0:1;
        $persist['server_type'] = empty($_SESSION['server_type'])?SERVER_UNKNOWN:$_SESSION['server_type'];
        session_destroy();
        $_SESSION = array();
        $_SESSION = $persist;
    }
    
    if (!isset($_SERVER)) $_SERVER =& $HTTP_SERVER_VARS;

    (php_sapi_name() == 'cli') && die("This script should only be run by a web server.\n");

    $page = get_request_parameter('page');
    $host = get_request_parameter('host');
    $clear = get_request_parameter('clear');
    $ini = get_request_parameter('ini');

    if (!empty($host)) {
        if ($host == 'ngd') {
            $_SESSION['not_go_daddy'] = 1;
        }
    }
    if (!empty($ini)) {
        $_SESSION['use_ini_method'] = 1;
    }

    if (!empty($clear)) {
        unset($_SESSION['latest_version']);
        unset($_SESSION['loader_platform_info']);
        unset($_SESSION['loader_version_info']);
        unset($_SESSION['php_compilers_info']);
        unset($_SESSION['not_go_daddy']);
        unset($_SESSION['use_ini_method']);
        unset($_SESSION['server_type']);
    }

    if (empty($_SESSION['latest_version'])) {
        $_SESSION['latest_version'] = retrieve_latest_version();
    }

    if (empty($_SESSION['server_type'])) {
        $_SESSION['server_type'] = SERVER_UNKNOWN;
    }

    if (!empty($page)) {
        $fn = "${page}_page";
        if (function_exists($fn)) {
            $fn();
        } else {
            default_page();
        }
    } else {
        $godaddy_root = GoDaddy_root();
        if (empty($godaddy_root)) {
            default_page();
        } else {
            GoDaddy_page($godaddy_root);
        }
    }
    @session_write_close();
    exit(0);
}