function loader_download_instructions() { $sysinfo = get_sysinfo(); $loader = get_loaderinfo(); $multiple_os_versions = false; if (is_ms_windows()) { if (is_bool($sysinfo['THREAD_SAFE'])) { if ($sysinfo['THREAD_SAFE']) { echo '<li>Download one of the following archives of 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 Windows non-TS x86 Loaders:'; } echo make_archive_list($basename, array('zip', 'ipf.zip')); echo "<p>Please note that the MS Windows installer version is suitable either for direct installation on a Windows machine or for \nuploading from a local PC to your server.<br>"; echo 'A Loaders archive can also be downloaded from <a href="' . LOADERS_PAGE . '" target="loaders">' . LOADERS_PAGE . '</a>.'; } else { echo '<li>Download a Windows Loaders archive from <a href="' . LOADERS_PAGE . '" target=loaders>here</a>. If PHP is built with thread safety disabled, use the Windows non-TS Loaders.'; } } else { $multiple_os_versions = count($loader['osvariants']) > 1; if ($multiple_os_versions) { list($reqd_version, $exact_match) = get_reqd_version($loader['osvariants']); if ($reqd_version) { $basename = LOADERS_PACKAGE_PREFIX . $loader['oscode'] . '_' . $reqd_version . '_' . $loader['arch']; } else { $basename = ""; } } else { $basename = LOADERS_PACKAGE_PREFIX . $loader['oscode'] . '_' . $loader['arch']; } if ($basename == "") { echo '<li>Download a ' . $loader['osname'] . ' ' . $loader['arch'] . ' Loaders archive from <a href="' . LOADERS_PAGE . '" target="loaders">here</a>.'; echo "<br>Your system appears to be {$loader['osname']} {$osv[0]} for {$loader['wordsize']} bit. If Loaders are not available for that exact release of {$loader['osname']}, Loaders built for an earlier release should work. Note that you may need to install back compatibility libraries for the operating system."; echo '<br>If you cannot find a suitable loader then please raise a ticket at <a href="' . SUPPORT_SITE . '">our support helpdesk</a>.'; } else { echo '<li>Download one of the following archives of Loaders for ' . $loader['osname'] . ' ' . $loader['arch'] . ':'; echo make_archive_list($basename, array('tar.gz', 'tar.bz2', 'ipf.zip')); echo "<p>Please note that the MS Windows installer version is suitable for uploading from a Windows PC to your {$loader['osname']} server.<br>"; echo "</p>"; if ($multiple_os_versions && !$exact_match) { echo "<p>Note that you may need to install back compatibility libraries for {$loader['osname']}.</p>"; } } } echo '</li>'; }
function unix_package_name() { $sysinfo = get_sysinfo(); $loader = get_loaderinfo(); $multiple_os_versions = false; if (is_array($loader) && array_key_exists('osvariants', $loader) && is_array($loader['osvariants'])) { $versions = array_values($loader['osvariants']); $multiple_os_versions = !empty($versions[0]); } if ($multiple_os_versions) { list($reqd_version, $exact_match) = get_reqd_version($loader['osvariants']); if ($reqd_version) { $basename = LOADERS_PACKAGE_PREFIX . $loader['oscode'] . '_' . $reqd_version . '_' . $loader['arch']; } else { $basename = ""; } } else { $basename = LOADERS_PACKAGE_PREFIX . $loader['oscode'] . '_' . $loader['arch']; } return array($basename, $multiple_os_versions); }