function loader_not_installed() { $loader = get_loaderinfo(); $sysinfo = get_sysinfo(); $stype = get_request_parameter('stype'); $manual_select = get_request_parameter('manual'); if (!isset($stype)) { echo '<p>To use files that have been protected by the <a href="' . ENCODER_URL . '" target=encoder>ionCube PHP Encoder</a>, a component called the ionCube Loader must be installed.</p>'; } if (!is_array($loader)) { if ($loader == ERROR_WINDOWS_64_BIT) { echo '<p>Loaders for 64-bit PHP on Windows are not currently available. However, if you <b>install and run 32-bit PHP</b> the corresponding 32-bit Loader for Windows should work.</p>'; if ($sysinfo['THREAD_SAFE']) { echo '<li>Download one of the following archives of 32-bit Windows x86 Loaders:'; $basename = LOADERS_PACKAGE_PREFIX . 'win_x86'; } else { $basename = LOADERS_PACKAGE_PREFIX . 'win_nonts_x86'; echo '<li>Download one of the following archives of 32-bit Windows non-TS x86 Loaders:'; } echo make_archive_list($basename); } else { echo '<p>There may not be a Loader available for your type of system at the moment, however if you create a <a href="' . SUPPORT_SITE . '">support ticket</a> more advice and information may be available to assist. Please include the URL for this Wizard in your ticket.</p>'; } } else { if (!is_supported_php_version()) { echo '<p>Your server is running PHP version ' . PHP_VERSION . ' and is unsupported by ionCube Loaders. Recommended PHP 4 versions are PHP 4.2 or higher, and PHP 5.1 or higher for PHP 5.</p>'; } elseif (!$sysinfo['SUPPORTED_COMPILER']) { $supported_compilers = supported_win_compilers(); $supported_compiler_string = join('/', $supported_compilers); echo '<p>At the current time the ionCube Loader requires PHP to be built with ' . $supported_compiler_string . '. Your PHP software has been built using ' . $sysinfo['PHP_COMPILER'] . '. Supported builds of PHP are available from <a href="http://windows.php.net/download/">PHP.net</a>.'; } else { if (!in_array($stype, array('s', 'd', 'l'))) { if (!$manual_select && is_local()) { local_install(); } elseif (!$manual_select && !is_possibly_dedicated_or_local()) { shared_server(); } else { echo server_selection_form(); } } else { switch ($stype) { case 's': shared_server(); break; case 'd': dedicated_server(); break; case 'l': local_install(); break; } } } } }
function find_server_type($chosen_type = '', $type_must_be_chosen = false, $set_session = false) { $server_type = SERVER_UNKNOWN; if (empty($chosen_type)) { if ($type_must_be_chosen) { $server_type = SERVER_UNKNOWN; } else { if (isset($_SESSION['server_type']) && $_SESSION['server_type'] != SERVER_UNKNOWN) { $server_type = $_SESSION['server_type']; } elseif (is_local()) { $server_type = SERVER_LOCAL; } elseif (!is_possibly_dedicated_or_local()) { $server_type = SERVER_SHARED; } else { $server_type = SERVER_UNKNOWN; } } } else { switch ($chosen_type) { case 's': $server_type = SERVER_SHARED; break; case 'd': $server_type = SERVER_DEDICATED; break; case 'l': $server_type = SERVER_LOCAL; break; default: $server_type = SERVER_UNKNOWN; break; } } if ($set_session) { $_SESSION['server_type'] = $server_type; } return $server_type; }