[-]
[+]
|
Changed |
php5-ioncube.spec
|
|
|
Changed |
ioncube_loaders_lin_x86-64.tar.bz2/ioncube_loader_lin_4.1.so
^
|
|
Changed |
ioncube_loaders_lin_x86-64.tar.bz2/ioncube_loader_lin_4.2.so
^
|
|
Changed |
ioncube_loaders_lin_x86-64.tar.bz2/ioncube_loader_lin_4.3.so
^
|
|
Changed |
ioncube_loaders_lin_x86-64.tar.bz2/ioncube_loader_lin_4.3_ts.so
^
|
|
Changed |
ioncube_loaders_lin_x86-64.tar.bz2/ioncube_loader_lin_4.4.so
^
|
|
Changed |
ioncube_loaders_lin_x86-64.tar.bz2/ioncube_loader_lin_4.4_ts.so
^
|
|
Changed |
ioncube_loaders_lin_x86-64.tar.bz2/ioncube_loader_lin_5.0.so
^
|
|
Changed |
ioncube_loaders_lin_x86-64.tar.bz2/ioncube_loader_lin_5.0_ts.so
^
|
|
Changed |
ioncube_loaders_lin_x86-64.tar.bz2/ioncube_loader_lin_5.1.so
^
|
|
Changed |
ioncube_loaders_lin_x86-64.tar.bz2/ioncube_loader_lin_5.1_ts.so
^
|
|
Changed |
ioncube_loaders_lin_x86-64.tar.bz2/ioncube_loader_lin_5.2.so
^
|
|
Changed |
ioncube_loaders_lin_x86-64.tar.bz2/ioncube_loader_lin_5.2_ts.so
^
|
|
Changed |
ioncube_loaders_lin_x86-64.tar.bz2/ioncube_loader_lin_5.3.so
^
|
|
Changed |
ioncube_loaders_lin_x86-64.tar.bz2/ioncube_loader_lin_5.3_ts.so
^
|
[-]
[+]
|
Changed |
ioncube_loaders_lin_x86-64.tar.bz2/loader-wizard.php
^
|
@@ -5,7 +5,7 @@
*
* ionCube is a registered trademark of ionCube Ltd.
*
- * Copyright (c) ionCube Ltd. 2002-2010
+ * Copyright (c) ionCube Ltd. 2002-2011
*/
@@ -30,6 +30,8 @@
define ('ERROR_INI_NOT_FOUND',207);
define ('ERROR_INI_NOT_READABLE',208);
define ('ERROR_INI_MULTIPLE_IC_LOADER_LINES',209);
+define ('ERROR_INI_USER_INI_NOT_FOUND',210);
+define ('ERROR_INI_USER_CANNOT_CREATE',211);
define ('ERROR_LOADER_UNEXPECTED_NAME',301);
define ('ERROR_LOADER_NOT_READABLE',302);
define ('ERROR_LOADER_PHP_MISMATCH',303);
@@ -77,17 +79,21 @@
LOADER_VERSION_URL . '?item=loader-platforms');
define ('LOADER_LATEST_VERSIONS_URL',
LOADER_VERSION_URL . '?item=loader-versions');
+define ('WIZARD_STATS_URL',
+ 'http://www.ioncube.com/feeds/stats/wizard.php');
define ('IONCUBE_DOWNLOADS_SERVER',
'http://downloads2.ioncube.com/loader_downloads');
define ('IONCUBE_CONNECT_TIMEOUT',4);
+define ('DEFAULT_SELF','/ioncube/loader-wizard.php');
define ('LOADER_NAME_CHECK',true);
define ('LOADER_EXTENSION_NAME','ionCube Loader');
define ('LOADER_SUBDIR','ioncube');
define ('WINDOWS_IIS_LOADER_DIR', 'system32');
-define ('ADDITIONAL_INI_FILE_NAME','aa_ioncube.ini');
+define ('ADDITIONAL_INI_FILE_NAME','20ioncube.ini');
define ('UNIX_SYSTEM_LOADER_DIR','/usr/local/ioncube');
define ('RECENT_LOADER_VERSION','3.1.24');
+define ('LATEST_LOADER_MAJOR_VERSION',4);
define ('LOADERS_PACKAGE_PREFIX','ioncube_loaders_');
define ('SESSION_LIFETIME_MINUTES',360);
define ('WIZARD_EXPIRY_MINUTES',10080);
@@ -96,9 +102,27 @@
run();
+if(!function_exists('http_build_query')) {
+ function http_build_query( $formdata, $numeric_prefix = null, $key = null ) {
+ $res = array();
+ foreach ((array)$formdata as $k=>$v) {
+ $tmp_key = urlencode(is_int($k) ? $numeric_prefix.$k : $k);
+ if ($key) $tmp_key = $key.'['.$tmp_key.']';
+ if ( is_array($v) || is_object($v) ) {
+ $res[] = http_build_query($v, null , $tmp_key);
+ } else {
+ $res[] = $tmp_key."=".urlencode($v);
+ }
+ }
+ $separator = ini_get('arg_separator.output');
+ return implode($separator, $res);
+ }
+}
+
+
function script_version()
{
- return "2.18";
+ return "2.29";
}
function retrieve_latest_wizard_version()
@@ -217,7 +241,7 @@
$v = php_version();
return ((($v['major'] == 4) && ($v['minor'] >= 1)) ||
- (($v['major'] == 5) && (($v['minor'] >= 1) || ($v['release'] >= 5))));
+ (($v['major'] == 5) && (($v['minor'] >= 1) || ($v['release'] >= 3))));
}
function is_php_version_or_greater($major,$minor,$release = 0)
@@ -285,11 +309,11 @@
$platforms[] = array('os'=>'fre', 'os_human'=>'FreeBSD 6', 'os_mod'=>'_6', 'arch'=>'x86', 'dirname'=>'freebsd_i386-6.2', 'us1-dir'=>'FreeBSD/v6/x86');
- $platforms[] = array('os'=>'fre', 'os_human'=>'FreeBSD 6', 'os_mod'=>'_6', 'arch'=>'x86-64', 'dirname'=>'freebsd_amd64-6.1', 'us1-dir'=>'FreeBSD/v6/AMD64');
+ $platforms[] = array('os'=>'fre', 'os_human'=>'FreeBSD 6', 'os_mod'=>'_6', 'arch'=>'x86-64', 'dirname'=>'freebsd_amd64-6.2', 'us1-dir'=>'FreeBSD/v6/AMD64');
- $platforms[] = array('os'=>'fre', 'os_human'=>'FreeBSD 7', 'os_mod'=>'_7', 'arch'=>'x86', 'dirname'=>'freebsd_i386-7.1', 'us1-dir'=>'FreeBSD/v7/x86');
- $platforms[] = array('os'=>'fre', 'os_human'=>'FreeBSD 7', 'os_mod'=>'_7', 'arch'=>'x86-64', 'dirname'=>'freebsd_amd64-7.2', 'us1-dir'=>'FreeBSD/v7/AMD64');
+ $platforms[] = array('os'=>'fre', 'os_human'=>'FreeBSD 7', 'os_mod'=>'_7', 'arch'=>'x86', 'dirname'=>'freebsd_i386-7.3', 'us1-dir'=>'FreeBSD/v7/x86');
+ $platforms[] = array('os'=>'fre', 'os_human'=>'FreeBSD 7', 'os_mod'=>'_7', 'arch'=>'x86-64', 'dirname'=>'freebsd_amd64-7.3', 'us1-dir'=>'FreeBSD/v7/AMD64');
$platforms[] = array('os'=>'fre', 'os_human'=>'FreeBSD 8', 'os_mod'=>'_8', 'arch'=>'x86', 'dirname'=>'freebsd_i386-8.0', 'us1-dir'=>'FreeBSD/v8/x86');
@@ -301,6 +325,7 @@
$platforms[] = array('os'=>'ope', 'os_human'=>'OpenBSD 4.2', 'os_mod'=>'_4.2', 'arch'=>'x86', 'dirname'=>'openbsd_i386-4.2', 'us1-dir'=>'OpenBSD/x86');
$platforms[] = array('os'=>'ope', 'os_human'=>'OpenBSD 4.5', 'os_mod'=>'_4.5', 'arch'=>'x86', 'dirname'=>'openbsd_i386-4.5', 'us1-dir'=>'OpenBSD/x86');
+ $platforms[] = array('os'=>'ope', 'os_human'=>'OpenBSD 4.6', 'os_mod'=>'_4.6', 'arch'=>'x86', 'dirname'=>'openbsd_i386-4.6', 'us1-dir'=>'OpenBSD/x86');
$platforms[] = array('os'=>'ope', 'os_human'=>'OpenBSD 4.7', 'os_mod'=>'_4.7', 'arch'=>'x86-64', 'dirname'=>'openbsd_amd64-4.7', 'us1-dir' => 'OpenBSD/x86_64');
@@ -449,16 +474,92 @@
return $arch;
}
+function uname($part = 'a')
+{
+ $result = '';
+ if (!function_is_disabled('php_uname')) {
+ $result = @php_uname($part);
+ } elseif (function_exists('posix_uname') && !function_is_disabled('posix_uname')) {
+ $posix_equivs = array(
+ 'm' => 'machine',
+ 'n' => 'nodename',
+ 'r' => 'release',
+ 's' => 'sysname'
+ );
+ $puname = @posix_uname();
+ if ($part == 'a' || !array_key_exists($part,$posix_equivs)) {
+ $result = join(' ',$puname);
+ } else {
+ $result = $puname[$posix_equivs[$part]];
+ }
+ } else {
+ if (!function_is_disabled('phpinfo')) {
+ ob_start();
+ phpinfo(INFO_GENERAL);
+ $pinfo = ob_get_contents();
+ ob_end_clean();
+ if (preg_match('~System.*?(</B></td><TD ALIGN="left">| => |v">)([^<]*)~i',$pinfo,$match)) {
+ $uname = $match[2];
+ if ($part == 'r') {
+ if (!empty($uname) && preg_match('/\S+\s+\S+\s+([0-9.]+)/',$uname,$matchver)) {
+ $result = $matchver[1];
+ } else {
+ $result = '';
+ }
+ } else {
+ $result = $uname;
+ }
+ }
+ } else {
+ $result = '';
+ }
+ }
+ return $result;
+}
+
+function calc_word_size($os_code)
+{
+ $wordsize = null;
+ if ('win' === $os_code) {
+ ob_start();
+ phpinfo(INFO_GENERAL);
+ $pinfo = ob_get_contents();
+ ob_end_clean();
+ if (preg_match('~Compiler.*?(</B></td><TD ALIGN="left">| => |v">)([^<]*)~i',$pinfo,$compmatch)) {
+ if (preg_match("/(VC[0-9]+)/i",$compmatch[2],$vcmatch)) {
+ $compiler = strtoupper($vcmatch[1]);
+ } else {
+ $compiler = 'VC6';
+ }
+ } else {
+ $compiler = 'VC6';
+ }
+ if ($compiler === 'VC9') {
+ if (isset($_ENV['PROCESSOR_ARCHITECTURE']) && preg_match('~(amd64|x86-64|x86_64)~i',$_ENV['PROCESSOR_ARCHITECTURE'])) {
+ if (preg_match('~Configure Command.*?(</B></td><TD ALIGN="left">| => |v">)([^<]*)~i',$pinfo,$confmatch)) {
+ if (preg_match('~(x64|lib64|system64)~i',$confmatch[2])) {
+ $wordsize = 64;
+ }
+ }
+ }
+ }
+ }
+ if (empty($wordsize)) {
+ $wordsize = ((-1^0xffffffff)?64:32);
+ }
+ return $wordsize;
+}
+
function required_loader($unamestr = '')
{
- $un = empty($unamestr)?php_uname():$unamestr;
+ $un = empty($unamestr)?uname():$unamestr;
$php_major_version = substr(PHP_VERSION,0,3);
$os_name = substr($un,0,strpos($un,' '));
$os_code = empty($os_name)?'':strtolower(substr($os_name,0,3));
- $wordsize = ((-1^0xffffffff) ? 64 : 32);
+ $wordsize = calc_word_size($os_code);
$arch = required_loader_arch($un,$os_code,$wordsize);
if (!is_string($arch)) {
@@ -470,7 +571,7 @@
}
$os_ver = '';
- if (preg_match('/([0-9.]+)/',php_uname('r'),$match)) {
+ if (preg_match('/([0-9.]+)/',uname('r'),$match)) {
$os_ver = $match[1];
}
$os_ver_parts = preg_split('@\.@',$os_ver);
@@ -582,7 +683,7 @@
}
}
if (!empty($php_ini_path)) {
- $real_path = realpath($php_ini_path);
+ $real_path = @realpath($php_ini_path);
if (false !== $real_path) {
$php_ini_path = $real_path;
}
@@ -761,17 +862,32 @@
return $se_enabled;
}
+function grsecurity_is_enabled()
+{
+ $gr_enabled = false;
+
+ if (!is_ms_windows()) {
+ $cmd = @shell_exec('gradm -S');
+ $gr_enabled = preg_match('/enabled/i',$cmd);
+ }
+
+ return $gr_enabled;
+}
+
function threaded_and_not_cgi()
{
$sys = get_sysinfo();
return($sys['THREAD_SAFE'] && !$sys['IS_CGI']);
}
-function is_restricted_server()
+function is_restricted_server($only_safe_mode = false)
{
$disable_functions = ini_get('disable_functions');
$open_basedir = ini_get('open_basedir');
- return (ini_get('safe_mode') || !empty($disable_functions) || !empty($open_basedir) || selinux_is_enabled());
+ $php_restrictions = !empty($disable_functions) || !empty($open_basedir);
+ $system_restrictions = selinux_is_enabled() || grsecurity_is_enabled();
+ $non_safe_mode_restrictions = $php_restrictions || $system_restrictions;
+ return (ini_get('safe_mode') || (!$only_safe_mode && $non_safe_mode_restrictions));
}
function server_restriction_warnings()
@@ -799,10 +915,10 @@
return $warnings;
}
-function own_php_ini_possible()
+function own_php_ini_possible($only_safe_mode = false)
{
$sysinfo = get_sysinfo();
- return ($sysinfo['CGI_CLI'] && !is_ms_windows() && !is_restricted_server());
+ return ($sysinfo['CGI_CLI'] && !is_ms_windows() && !is_restricted_server($only_safe_mode));
}
function extension_dir()
@@ -829,12 +945,12 @@
function extension_dir_path()
{
- return realpath(extension_dir());
+ return @realpath(extension_dir());
}
function get_loader_name()
{
- $u = php_uname();
+ $u = uname();
$os = substr($u,0,strpos($u,' '));
$os_key = strtolower(substr($u,0,3));
@@ -870,7 +986,12 @@
function get_default_loader_dir_webspace()
{
- return ($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . LOADER_SUBDIR);
+ $cgi_bin_dir = $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "cgi-bin";
+ if (is_dir($cgi_bin_dir)) {
+ return $cgi_bin_dir;
+ } else {
+ return ($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . LOADER_SUBDIR);
+ }
}
function get_loader_location($loader_dir = '')
@@ -1001,17 +1122,34 @@
$ldloc = '';
$sysinfo = get_sysinfo();
$ini_file_list = array_merge(array($sysinfo['PHP_INI']),get_additional_ini_files());
- $errors = array();
+ $server_type = find_server_type();
+ $shared_server = SERVER_SHARED == $server_type;
+ $ini_files_not_found = array();
foreach ($ini_file_list as $f) {
$ldloc = get_loader_location_from_ini($f);
if (array_key_exists(ERROR_INI_ZE_LINE_NOT_FOUND,$ldloc['errors'])) {
unset($ldloc['errors'][ERROR_INI_ZE_LINE_NOT_FOUND]);
}
- $errors = array_merge($errors,$ldloc['errors']);
+ if ($shared_server && array_key_exists(ERROR_INI_NOT_FOUND,$ldloc['errors'])) {
+ if (false == user_ini_space_path($f)) {
+ $ldloc['errors'][ERROR_INI_NOT_FOUND] = "A system ini file cannot be found or read by the Wizard - you cannot do anything about this on your shared server.";
+ } else {
+ $ldloc['errors'][ERROR_INI_USER_INI_NOT_FOUND] = $ldloc['errors'][ERROR_INI_NOT_FOUND];
+ }
+ } elseif (array_key_exists(ERROR_INI_NOT_FOUND,$ldloc['errors'])) {
+ $ini_files_not_found[] = $f;
+ }
if (!empty($ldloc['location'])) {
break;
}
}
+ if (!empty($ini_files_not_found)) {
+ $plural = (count($ini_files_not_found) > 1)?"s":"";
+ $ldloc['errors'][ERROR_INI_NOT_FOUND] = "The following ini file$plural could not be found by the Wizard: " . join(',',$ini_files_not_found);
+ if (is_restricted_server()) {
+ $ldloc['errors'][ERROR_INI_NOT_FOUND] .= "<br> This may be due to server restrictions in place.";
+ }
+ }
if (empty($ldloc['location'])) {
$ldloc['errors'][ERROR_INI_ZE_LINE_NOT_FOUND] = "The necessary zend_extension line could not be found in the configuration.";
}
@@ -1026,7 +1164,7 @@
if (@file_exists($suggested_loader_path)) {
$location = $suggested_loader_path;
} elseif (@file_exists($loader_name)) {
- $location = realpath($loader_name);
+ $location = @realpath($loader_name);
} else {
$ld_loc = get_loader_location();
if (@file_exists($ld_loc)) {
@@ -1078,6 +1216,8 @@
{
$old_version = true;
$liv = "";
+ $lv = "";
+ $mv = 0;
if (function_exists('ioncube_loader_iversion')) {
$liv = ioncube_loader_iversion();
$lv = sprintf("%d.%d.%d", $liv / 10000, ($liv / 100) % 100, $liv % 100);
@@ -1094,8 +1234,9 @@
} else {
$old_version = $latest_version;
}
+ $mv = $cur_parts[0];
}
- return array($lv,$old_version);
+ return array($lv,$mv,$old_version);
}
function default_loader_version_info()
@@ -1113,7 +1254,7 @@
$platform_info = get_platforminfo();
$loader = get_loaderinfo();
$multiple_os_versions = false;
- if (array_key_exists('osvariants',$loader) && is_array($loader['osvariants'])) {
+ if (is_array($loader) && array_key_exists('osvariants',$loader) && is_array($loader['osvariants'])) {
$versions = array_values($loader['osvariants']);
$multiple_os_versions = !empty($versions[0]);
}
@@ -1308,6 +1449,28 @@
return (LOADERS_PACKAGE_PREFIX . 'win' . '_' . ($sys['THREAD_SAFE']?'':'nonts_') . strtolower($sys['PHP_COMPILER']) . '_' . 'x86');
}
+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);
+}
+
function loader_download_instructions()
{
$sysinfo = get_sysinfo();
@@ -1316,11 +1479,12 @@
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:';
- } else {
- echo '<li>Download one of the following archives of Windows non-TS x86 Loaders:';
+ $download_str = '<li>Download one of the following archives of Windows ' . $sysinfo['PHP_COMPILER'];
+ if (!$sysinfo['THREAD_SAFE']) {
+ $download_str .= ' non-TS';
}
+ $download_str .= ' x86 Loaders:';
+ echo $download_str;
$basename = windows_package_name();
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
@@ -1330,21 +1494,7 @@
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 = false;
- if (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'];
- }
+ list($basename,$multiple_os_versions) = unix_package_name();
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['osnamequal']} 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.";
@@ -1383,36 +1533,68 @@
return $parent_dir;
}
-function loader_install_dir($server_type)
+function unix_install_dir()
{
- if (SERVER_SHARED == $server_type && own_php_ini_possible()) {
- $loader_dir = get_default_loader_dir_webspace();
+ $ext_dir = extension_dir_path();
+ $cur_dir = @realpath('.');
+ if (empty($ext_dir) || $ext_dir == $cur_dir) {
+ $loader_dir = UNIX_SYSTEM_LOADER_DIR;
} else {
- if (is_ms_windows()) {
- $sysinfo = get_sysinfo();
- if ($sysinfo['SS'] == 'IIS') {
- if (false === ($ext_dir = extension_dir_path())) {
- $parent_dir = ini_dir();
- $ext_dir = $parent_dir . '\\ext';
- if (!empty($parent_dir) && @file_exists($ext_dir)) {
- $loader_dir = $ext_dir;
- } else {
- $loader_dir = $_SERVER['windir'] . '\\' . WINDOWS_IIS_LOADER_DIR;
- }
- } else {
- $loader_dir = $ext_dir;
- }
+ $loader_dir = $ext_dir;
+ }
+ return $loader_dir;
+}
+
+function windows_install_dir()
+{
+ $sysinfo = get_sysinfo();
+ if ($sysinfo['SS'] == 'IIS') {
+ if (false === ($ext_dir = extension_dir_path())) {
+ $parent_dir = ini_dir();
+ $ext_dir = $parent_dir . '\\ext';
+ if (!empty($parent_dir) && @file_exists($ext_dir)) {
+ $loader_dir = $ext_dir;
} else {
- $parent_dir = ini_dir();
- $loader_dir = $parent_dir . '\\' . 'ioncube';
+ $loader_dir = $_SERVER['windir'] . '\\' . WINDOWS_IIS_LOADER_DIR;
}
} else {
- $loader_dir = UNIX_SYSTEM_LOADER_DIR;
+ $loader_dir = $ext_dir;
}
+ } else {
+ $parent_dir = ini_dir();
+ $loader_dir = $parent_dir . '\\' . 'ioncube';
+ }
+ return $loader_dir;
+}
+
+function loader_install_dir($server_type)
+{
+ if (SERVER_SHARED == $server_type && own_php_ini_possible()) {
+ $loader_dir = get_default_loader_dir_webspace();
+ } elseif (is_ms_windows()) {
+ $loader_dir = windows_install_dir();
+ } else {
+ $loader_dir = unix_install_dir();
}
return $loader_dir;
}
+function writeable_directories()
+{
+ $root_path = @realpath($_SERVER['DOCUMENT_ROOT']);
+ $above_root_path = @realpath($_SERVER['DOCUMENT_ROOT'] . "/..");
+ $root_path_cgi_bin = @realpath($_SERVER['DOCUMENT_ROOT'] . "/cgi-bin");
+ $above_root_cgi_bin = @realpath($_SERVER['DOCUMENT_ROOT'] . "/../cgi-bin");
+
+ $paths = array();
+ foreach (array($root_path,$above_root_path,$root_path_cgi_bin,$above_root_cgi_bin) as $p) {
+ if (is_writeable($p)) {
+ $paths[] = $p;
+ }
+ }
+ return $paths;
+}
+
function loader_install_instructions($server_type,$loader_dir = '')
{
if (empty($loader_dir)) {
@@ -1445,19 +1627,51 @@
return $zend_extension_lines;
}
+function user_ini_base()
+{
+ $doc_root_path = realpath($_SERVER['DOCUMENT_ROOT']);
+ $above_root_path = @realpath($_SERVER['DOCUMENT_ROOT'] . "/..");
+ if (!empty($above_root_path) && is_writeable($above_root_path)) {
+ $start_path = $above_root_path;
+ } else {
+ $start_path = $doc_root_path;
+ }
+ return $start_path;
+}
+
+function user_ini_space_path($file)
+{
+ $user_base = user_ini_base();
+ $fpath = @realpath($file);
+ if (!empty($fpath) && (0 === strpos($fpath,$user_base))) {
+ return $fpath;
+ } else {
+ return false;
+ }
+}
+
+function default_ini_path()
+{
+ $cgi_bin_dir = @realpath($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "cgi-bin");
+ if (is_dir($cgi_bin_dir)) {
+ return $cgi_bin_dir;
+ } else {
+ return (realpath($_SERVER['DOCUMENT_ROOT']));
+ }
+}
+
function shared_ini_location()
{
$phprc = getenv('PHPRC');
- $doc_root_path = realpath($_SERVER['DOCUMENT_ROOT']);
if (!empty($phprc)) {
- $phprc_path = realpath($phprc);
- if (0 === strpos($phprc_path,$doc_root_path)) {
+ $phprc_path = user_ini_space_path($phprc);
+ if (false !== $phprc_path) {
return $phprc_path;
} else {
- return $doc_root_path;
+ return default_ini_path();
}
} else {
- return $doc_root_path;
+ return default_ini_path();
}
}
@@ -1487,11 +1701,11 @@
$zend_extension_lines = zend_extension_lines($loader_dir);
if (SERVER_SHARED == $server_type && own_php_ini_possible()) {
- $html_dir = shared_ini_location();
- $php_ini_path = $html_dir . DIRECTORY_SEPARATOR . $php_ini_name;
+ $ini_dir = shared_ini_location();
+ $php_ini_path = $ini_dir . DIRECTORY_SEPARATOR . $php_ini_name;
if (@file_exists($php_ini_path)) {
- $edit_line = "<li>Edit the <code>$php_ini_name</code> in the <code>$html_dir</code> directory";
- if (zend_extension_line_missing($php_ini_path) && is_writeable($php_ini_path) && is_writeable($html_dir)) {
+ $edit_line = "<li>Edit the <code>$php_ini_name</code> in the <code>$ini_dir</code> directory";
+ if (zend_extension_line_missing($php_ini_path) && is_writeable($php_ini_path) && is_writeable($ini_dir)) {
if (function_exists('file_get_contents')) {
$ini_strs = @file_get_contents($php_ini_path);
} else {
@@ -1514,8 +1728,8 @@
echo $edit_line;
}
} else {
- $download_ini_file = "<li><a href=\"$base&page=phpconfig&ininame=$php_ini_name&stype=$server_type_code&download=1&prepend=1\">Save this <code>$php_ini_name</code> file</a> and upload it to <code>$html_dir</code> (full path on your server).";
- if (is_writeable($html_dir)) {
+ $download_ini_file = "<li><a href=\"$base&page=phpconfig&ininame=$php_ini_name&stype=$server_type_code&download=1&prepend=1\">Save this <code>$php_ini_name</code> file</a> and upload it to <code>$ini_dir</code> (full path on your server).";
+ if (is_writeable($ini_dir)) {
$fh = @fopen($php_ini_path,"wb");
if ($fh !== false) {
foreach ($zend_extension_lines as $zl) {
@@ -1531,7 +1745,7 @@
fwrite($fh,$ini_strs);
}
fclose($fh);
- echo "<li>A <code>$php_ini_name</code> file has been created for you in <code>$html_dir</code>.";
+ echo "<li>A <code>$php_ini_name</code> file has been created for you in <code>$ini_dir</code>.";
} else {
echo $download_ini_file;
}
@@ -1582,7 +1796,7 @@
echo "<li>Restart the server software.</li>";
}
- echo "<li>When the server software has restarted, <a href=\"$base&page=loader_check\">click here to test the Loader</a>.</li>";
+ echo "<li>When the server software has restarted, <a href=\"$base&page=loader_check\" onclick=\"showOverlay();\">click here to test the Loader</a>.</li>";
if ($sysinfo['SS'] == 'Apache' && !is_ms_windows()) {
echo '<li>If the Loader installation failed, check the Apache error log file for errors and see our guide to <a target="unix_errors" href="'. UNIX_ERRORS_URL . '">Unix related errors</a>.</li>';
@@ -1592,7 +1806,7 @@
function shared_test_instructions()
{
$base = get_base_address();
- echo "<li><a href=\"$base&page=loader_check\">Click here to test the Loader</a>.</li>";
+ echo "<li><a href=\"$base&page=loader_check\" onclick=\"showOverlay();\">Click here to test the Loader</a>.</li>";
}
function link_to_php_ini_instructions()
@@ -1666,11 +1880,15 @@
{
$base = get_base_address();
$server_type_code = server_type_code();
+ $server_type = find_server_type();
$resources = array(
- '<a target="_blank" href="' . LOADERS_FAQ_URL . '">ionCube Loaders FAQ</a>',
- '<a target="_blank" href="' . LOADER_FORUM_URL . '">ionCube Loader Forum</a>',
- '<a target="_blank" href="' . SUPPORT_SITE . 'index.php?department=3&subject=ionCube+Loader+installation+problem&message='. support_ticket_information($error_list) . '">Raise a support ticket through our helpdesk</a>');
- if (SERVER_LOCAL == find_server_type()) {
+ '<a target="_blank" href="' . LOADERS_FAQ_URL . '">ionCube Loaders FAQ</a>',
+ '<a target="_blank" href="' . LOADER_FORUM_URL . '">ionCube Loader Forum</a>'
+ );
+ if (SERVER_SHARED != $server_type || own_php_ini_possible(true)) {
+ $resources[2] = '<a target="_blank" href="' . SUPPORT_SITE . htmlentities('index.php?department=3&subject=ionCube+Loader+installation+problem&message='. support_ticket_information($error_list)) . '">Raise a support ticket through our helpdesk</a>';
+ }
+ if (SERVER_LOCAL == $server_type) {
$resources[2] .= "<br><span id=\"download-archive\">Once the support ticket has been created, please";
$resources[2] .= " <a href=\"$base&page=system_info_archive&stype=$server_type_code\">click here to get an archive of system information</a>.<br>";
$resources[2] .= "Please attach that archive of system information to the ticket that you have created.</span>";
@@ -1821,6 +2039,8 @@
$info_lines["Operating system"] = $ld['osname'] . ' ' . $ld['osver'];
if (selinux_is_enabled() || possibly_selinux()) {
$info_lines["Security enhancements"] = "SELinux";
+ } elseif (grsecurity_is_enabled()) {
+ $info_lines["Security enhancements"] = "Grsecurity";
} else {
$info_lines["Security enhancements"] = "None";
}
@@ -1862,6 +2082,10 @@
$info_lines["Loader path"] = "LOADER PATH NOT FOUND";
}
$server_type_code = server_type_code();
+ if (!empty($_SESSION['hostprovider'])) {
+ $info_lines['Hosting provider'] = $_SESSION['hostprovider'];
+ $info_lines['Provider URL'] = $_SESSION['hosturl'];
+ }
$info_lines["Wizard script path"] = '[url]http://' . $_SERVER["HTTP_HOST"] . get_self() . '?stype='. $server_type_code . '[/url]';
$ticket_strs[] = "[table]";
foreach ($info_lines as $h => $i) {
@@ -1874,7 +2098,60 @@
$ticket_strs[] = "PLEASE ENTER ANY ADDITIONAL INFORMATION BELOW\r\n";
$support_ticket_str = join('',$ticket_strs);
- return rawurlencode($support_ticket_str);
+ return urlencode($support_ticket_str);
+}
+
+function wizard_stats_data($page_id)
+{
+ $data = array();
+
+ try_runtime_loading_if_applicable();
+ $sysinfo = get_sysinfo();
+ $ldinfo = get_loaderinfo();
+
+ $data['sessionid'] = session_id();
+ $data['wizard_version'] = script_version();
+ $data['server_type'] = server_type_code();
+ $data['hostprovider'] = (isset($_SESSION['hostprovider']))?$_SESSION['hostprovider']:'';
+ $data['hosturl'] = (isset($_SESSION['hosturl']))?$_SESSION['hosturl']:'';
+ $data['page_id'] = $page_id;
+ $data['loader_state'] = (extension_loaded(LOADER_EXTENSION_NAME))?'installed':'failure';
+ $data['ini_location'] = $sysinfo['PHP_INI'];
+ $data['is_cgi'] = ($sysinfo['IS_CGI'])?"yes":"no";
+ $data['is_ts'] = ($sysinfo['THREAD_SAFE'])?"yes":"no";
+ $data['arch'] = $ldinfo['arch'];
+ $data['php_version'] = PHP_VERSION;
+ $data['os'] = $ldinfo['osname'];
+ $data['word_size'] = $ldinfo['wordsize'];
+ $data['referrer'] = $_SERVER["HTTP_HOST"] . get_self();
+
+ return $data;
+}
+
+function send_stats($page_id = 'default')
+{
+ $server_type = find_server_type();
+ $res = false;
+
+ if (SERVER_LOCAL != $server_type) {
+ $stats_data = wizard_stats_data($page_id);
+
+ if (!isset($_SESSION['stats_sent'][$page_id][$stats_data['loader_state']])) {
+ $url = WIZARD_STATS_URL;
+
+ if (!empty($stats_data)) {
+ $qparams = http_build_query($stats_data);
+ $url .= '?' . $qparams;
+ $res = remote_file_contents($url);
+ }
+ $_SESSION['stats_sent'][$page_id][$stats_data['loader_state']] = 1;
+ } else {
+ $res = true;
+ }
+ } else {
+ $res = 'LOCAL';
+ }
+ return $res;
}
function os_arch_string_check($loader_str)
@@ -2014,7 +2291,7 @@
} else {
$errors[ERROR_LOADER_PHP_VERSION_UNKNOWN] = "The PHP version for the loader cannot be determined - please check that you have a valid ionCube Loader.";
}
- $errors = array_merge($errors,os_arch_string_check($loader_strs));
+ $errors += os_arch_string_check($loader_strs);
return $errors;
}
@@ -2029,8 +2306,12 @@
php_ini_install_shared();
}
} else {
- list($lv,$is_old) = ioncube_loader_version_information();
+ list($lv,$mv,$newer_version) = ioncube_loader_version_information();
echo "<p>The ionCube Loader $lv has been successfully installed.</p>";
+ $is_legacy_loader = loader_major_version_instructions($mv);
+ if ($is_legacy_loader) {
+ loader_upgrade_instructions($lv,$newer_version);
+ }
successful_install_end_instructions($rtl_path);
}
}
@@ -2156,6 +2437,15 @@
unset($_SESSION['not_go_daddy']);
unset($_SESSION['use_ini_method']);
unset($_SESSION['server_type']);
+ } else {
+ $stype = get_request_parameter('stype');
+ $hostprovider = get_request_parameter('hostprovider');
+ $hosturl = get_request_parameter('hosturl');
+ if (!empty($hostprovider)) {
+ $_SESSION['hostprovider'] = $hostprovider;
+ $_SESSION['hosturl'] = $hosturl;
+ }
+ $server_type = find_server_type($stype,false,true);
}
if ($session_ok && !$timeout && !isset($_SESSION['initial_run']) && empty($page)) {
$_SESSION['initial_run'] = 1;
@@ -2365,11 +2655,14 @@
$rtl = try_runtime_loading_if_applicable();
- if (extension_loaded($loader_extension)) {
+ $server_type = find_server_type();
+
+ if (extension_loaded($loader_extension) && $server_type != SERVER_UNKNOWN) {
loader_already_installed($rtl);
} else {
loader_not_installed();
}
+ send_stats('default');
footer($wizard_update);
}
@@ -2405,29 +2698,75 @@
uninstall_wizard_instructions();
}
+function loader_major_version_instructions($mv)
+{
+ if ($mv < LATEST_LOADER_MAJOR_VERSION) {
+ echo "<p><strong>The installed version of the Loader cannot run files produced by the most recent ionCube Encoder.</strong>";
+ echo " You will need a version " . LATEST_LOADER_MAJOR_VERSION . " ionCube Loader to run such files.</p>";
+ }
+ return ($mv < LATEST_LOADER_MAJOR_VERSION);
+}
+
function loader_already_installed($rtl = null)
{
- list($lv,$old_version) = ioncube_loader_version_information();
- echo "<p>";
- if ($old_version) {
- echo 'The ionCube Loader ' . $lv . ' is already installed but it is an old version.';
- echo ' It is recommended that the Loader be updated to the latest version';
- if (is_string($old_version)) {
- echo ", $old_version,";
- }
- echo ' from the <a href="' . LOADERS_PAGE . '">ionCube Loaders page</a>';
- if (!is_string($old_version)) {
- echo ' if one is available for your platform';
- }
- echo '.';
+ list($lv,$mv,$newer_version) = ioncube_loader_version_information();
+ echo '<div class="success">';
+ echo '<h4>Loader Installed</h4>';
+ if ($newer_version) {
+ echo '<p>The ionCube Loader version ' . $lv . ' is <strong>already installed</strong> but it is an old version.';
+ echo ' It is recommended that the Loader be upgraded to the latest version if possible.</p>';
+ $know_latest_version = is_string($newer_version);
+ $is_legacy_loader = loader_major_version_instructions($mv);
+ echo '</div>';
+ loader_upgrade_instructions($lv,$newer_version);
} else {
- echo 'The ionCube Loader version ' . $lv . ' is already installed and encoded files should run without problems.';
+ echo '<p>The ionCube Loader version ' . $lv . ' is already installed and encoded files should run without problems.</p>';
+ echo '</div>';
+ $is_legacy_loader = loader_major_version_instructions($mv,true);
+ if ($is_legacy_loader) {
+ loader_upgrade_instructions($lv,true);
+ }
}
- echo "</p>";
successful_install_end_instructions($rtl);
}
+function loader_upgrade_instructions($installed_version,$newer_version)
+{
+ if ($newer_version) {
+ echo '<div class="panel">';
+ echo '<h4>Loader Upgrade Instructions</h4>';
+ $restart_needed = true;
+ $server_type = find_server_type();
+ if ($server_type == SERVER_SHARED || $server_type == SERVER_UNKNOWN) {
+ $loader_path = find_loader(true);
+ if (!is_string($loader_path) || false === user_ini_space_path($loader_path)) {
+ $verb_case = ($server_type == SERVER_UNKNOWN)?"may":"will";
+ echo "<p>Please note that you $verb_case need your system administrator to do the following to upgrade. The web server will need to be restarted after the loader file is changed.</p>";
+ }
+ $restart_needed = false;
+ }
+ if (is_string($newer_version)) {
+ $version_str = "version $newer_version";
+ } else {
+ $version_str = "a newer version";
+ }
+ $loader_name = get_loader_name();
+ echo "<p>To upgrade from version $installed_version to $version_str of the ionCube Loader, please replace your existing loader file, $loader_name, with
+ the file of the same name from one of the following packages:</p>";
+ if (is_ms_windows()) {
+ $basename = windows_package_name();
+ } else {
+ list($basename,$multiple_os_versions) = unix_package_name();
+ }
+ echo make_archive_list($basename,array('zip','tar.gz'));
+ if ($restart_needed) {
+ echo "<p>Once you have replaced the loader file please restart your web server.</p>";
+ }
+ echo '</div>';
+ }
+}
+
function loader_not_installed()
{
$loader = get_loaderinfo();
@@ -2512,16 +2851,66 @@
{
$self = get_self();
$timeout = (isset($_SESSION['timing_out']) && $_SESSION['timing_out'])?1:0;
+ $hostprovider = (!empty($_SESSION['hostprovider']))?$_SESSION['hostprovider']:'';
+ $hosturl = (!empty($_SESSION['hosturl']))?$_SESSION['hosturl']:'';
$form = <<<EOT
<p>This Wizard will give you information on how to install the ionCube Loader.</p>
<p>Please select the type of web server that you have and then click Next.</p>
+ <script type=text/javascript>
+ function trim(s) {
+ return s.replace(/^\s+|\s+$/g,"");
+ }
+ function input_ok() {
+ var l = document.getElementById('local');
+ if (l.checked) {
+ return true;
+ }
+
+ var s = document.getElementById('shared');
+ var d = document.getElementById('dedi');
+
+ if (!s.checked && !d.checked) {
+ alert("Please select one of the server types.");
+ return false;
+ } else {
+ var hn = document.getElementById('hostprovider');
+ var hu = document.getElementById('hosturl');
+ var hostprovider = trim(hn.value);
+ var hosturl = trim(hu.value);
+
+ if (!hostprovider || !hosturl) {
+ alert("Please enter both a hosting provider name and their URL.");
+ return false;
+ }
+ if (hostprovider.length < 4) {
+ alert("The hosting provider name should be at least 4 characters in length.");
+ return false;
+ }
+ if (!hosturl.match(/[A-Za-z0-9-_]+\.[A-Za-z0-9-_%&\?\/.=]+/)) {
+ alert("The hosting provider URL is invalid.");
+ return false;
+ }
+ if (hosturl.length < 5) {
+ alert("The hosting provider URL should be at least 5 characters in length.");
+ return false;
+ }
+ }
+ return true;
+ }
+ </script>
<form method=GET action=$self>
<input type="hidden" name="page" value="default">
<input type="hidden" name="timeout" value="$timeout">
- <input type=radio id=shared name=stype value=s><label for=shared>Shared <small>(for example, server with FTP access only and no access to php.ini)</small></label><br>
- <input type=radio id=dedi name=stype value=d><label for=dedi>Dedicated or VPS <small>(server with full root ssh access)</small></label><br>
- <input type=radio id=local name=stype value=l><label for=local>Local install</label>
- <p><input type=submit value=Next></p>
+ <input type=radio id=shared name=stype value=s onclick="document.getElementById('hostinginfo').style.display = 'block';"><label for=shared>Shared <small>(for example, server with FTP access only and no access to php.ini)</small></label><br>
+ <input type=radio id=dedi name=stype value=d onclick="document.getElementById('hostinginfo').style.display = 'block';"><label for=dedi>Dedicated or VPS <small>(server with full root ssh access)</small></label><br>
+ <div id="hostinginfo" style="display: none">If you are on a shared or dedicated server, please give your hosting provider and their URL:
+ <table>
+ <tr><td><label for=hostprovider>Name of your hosting provider</label></td><td><input type=text id="hostprovider" name=hostprovider value="$hostprovider"></td></tr>
+ <tr><td><label for=hosturl>URL of your hosting provider</label></td><td><input type=text id="hosturl" name=hosturl value="$hosturl"></td></tr>
+ </table>
+ </div>
+ <input type=radio id=local name=stype value=l onclick="document.getElementById('hostinginfo').style.display = 'none';"><label for=local>Local install</label>
+ <p><input type=submit value=Next onclick="return (input_ok(this) && showOverlay());"></p>
</form>
EOT;
return $form;
@@ -2544,29 +2933,42 @@
$rtl_path = try_runtime_loading_if_applicable();
if (extension_loaded($ext_name)) {
- list($lv,$is_old) = ioncube_loader_version_information();
- echo '<p>The ionCube Loader version ' . $lv . ' is installed and encoded files should run successfully.</p>';
- if ($is_old) {
- echo '<p>Please note though that you have an old version of the ionCube Loader.';
- if (is_string($is_old)) {
- echo " The latest version is $is_old.";
- }
+ list($lv,$mv,$newer_version) = ioncube_loader_version_information();
+ echo '<div class="success">';
+ echo '<h4>Loader Installed Successfully</h4>';
+ echo '<p>The ionCube Loader version ' . $lv . ' <strong>is installed</strong> and encoded files should run successfully.';
+ if ($newer_version) {
+ echo ' Please note though that you have an old version of the ionCube Loader.</p>';
+ $is_legacy_loader = loader_major_version_instructions($mv);
+ echo '</div>';
+ loader_upgrade_instructions($lv,$newer_version);
+ } else {
echo '</p>';
+ $is_legacy_loader = loader_major_version_instructions($mv);
+ echo '</div>';
+ if ($is_legacy_loader) {
+ loader_upgrade_instructions($lv,true);
+ }
}
successful_install_end_instructions($rtl_path);
} else {
+ echo '<div class="failure">';
+ echo '<h4>Loader Not Installed</h4>';
echo '<p>The ionCube Loader is <b>not</b> currently installed successfully.</p>';
if (!is_null($rtl_path)) {
echo '<p>Runtime loading was attempted but has failed.</p>';
+ echo '</div>';
$rt_errors = runtime_loading_errors();
if (!empty($rt_errors)) {
list_loader_errors($rt_errors);
}
link_to_php_ini_instructions();
} else {
+ echo '</div>';
list_loader_errors();
}
}
+ send_stats('check');
footer(true);
}
@@ -2574,6 +2976,9 @@
function ini_loader_errors()
{
$errors = array();
+ if (SERVER_SHARED == find_server_type() && !own_php_ini_possible(true)) {
+ $errors[ERROR_INI_USER_CANNOT_CREATE] = "It appears that you are not be able to create your own ini files on your shared server. <br><strong>You will need to ask your server administrator to install the ionCube Loader for you.</strong>";
+ }
$loader_loc = find_loader();
if (is_string($loader_loc)) {
if (!shared_and_runtime_loading()) {
@@ -2584,9 +2989,9 @@
$errors[ERROR_INI_NOT_FOUND] = 'The PHP configuration file (' . $sys['PHP_INI'] .') cannot be found.';
}
}
- $errors = array_merge($errors,loader_compatibility_test($loader_loc));
+ $errors = $errors + loader_compatibility_test($loader_loc);
} else {
- $errors = $loader_loc;
+ $errors = $errors + $loader_loc;
}
return $errors;
}
@@ -2613,9 +3018,9 @@
$rel_path = '';
$rootpath = realpath($_SERVER['DOCUMENT_ROOT']);
for ($seps = 0; $seps < $depth; $seps++) {
- $full_ini_loc = realpath($startdir . '/' . $rel_path) . DIRECTORY_SEPARATOR . $ini_name;
+ $full_ini_loc = @realpath($startdir . '/' . $rel_path) . DIRECTORY_SEPARATOR . $ini_name;
if (@file_exists($full_ini_loc) && $sys['PHP_INI'] != $full_ini_loc) {
- $ini_list[] = realpath($full_ini_loc);
+ $ini_list[] = @realpath($full_ini_loc);
}
if (dirname($full_ini_loc) == $rootpath) {
@@ -2663,34 +3068,40 @@
$warnings = array();
if (find_server_type() == SERVER_SHARED)
{
- $sys = get_sysinfo();
- $ini_name = ini_file_name();
- $rootpath = realpath($_SERVER['DOCUMENT_ROOT']);
- $here = unix_path_dir();
- $ini_files = unrecognised_inis_webspace($here);
- foreach ($ini_files as $full_ini_loc) {
- $advice = "The file $full_ini_loc is not being recognised by PHP.";
- $advice .= " Please check that the name and location of the file are correct.";
- if (!ini_same_dir_as_wizard()) {
- $shared_ini_loc = shared_ini_location();
- $ini_dir = dirname($sys['PHP_INI']);
- $ini_loc_dir = dirname($full_ini_loc);
- $shared_ini_file = $shared_ini_loc . DIRECTORY_SEPARATOR . $ini_name;
- if (!@file_exists($shared_ini_file) && $ini_loc_dir != $shared_ini_loc && $ini_dir != $shared_ini_loc) {
- $advice .= " Please try copying the <code>$full_ini_loc</code> file to <code>" . $shared_ini_loc . "</code>.";
- } else {
- $root_ini_file = $rootpath . DIRECTORY_SEPARATOR . $ini_name;
- if (!@file_exists($root_ini_file) && $rootpath != $shared_ini_loc && $full_ini_loc != $rootpath) {
- $advice .= " Please try copying the <code>$full_ini_loc</code> file to <code>" . $rootpath . "</code>.";
- }
- $herepath = realpath($here);
- $here_ini_file = $herepath . DIRECTORY_SEPARATOR . $ini_name;
- if (!@file_exists($here_ini_file) && $herepath != $rootpath) {
- $advice .= " It may be necessary to copy the <code>$full_ini_loc</code> file to <code>$herepath</code> and to all " . (is_ms_windows()?'folders':'directories') . ' in which you have encoded files';
+ if (own_php_ini_possible()) {
+ $sys = get_sysinfo();
+ $ini_name = ini_file_name();
+ $rootpath = realpath($_SERVER['DOCUMENT_ROOT']);
+ $root_ini_file = $rootpath . DIRECTORY_SEPARATOR . $ini_name;
+ $here = unix_path_dir();
+ $ini_files = unrecognised_inis_webspace($here);
+ $shared_ini_loc = shared_ini_location();
+ $shared_ini_file = $shared_ini_loc . DIRECTORY_SEPARATOR . $ini_name;
+ $ini_dir = dirname($sys['PHP_INI']);
+ foreach ($ini_files as $full_ini_loc) {
+ $advice = "The file $full_ini_loc is not being recognised by PHP.";
+ $advice .= " Please check that the name and location of the file are correct.";
+ if (!ini_same_dir_as_wizard()) {
+ $ini_loc_dir = dirname($full_ini_loc);
+ if (!@file_exists($shared_ini_file) && !empty($shared_ini_loc) && $ini_loc_dir != $shared_ini_loc && $ini_dir != $shared_ini_loc) {
+ $advice .= " Please try copying the <code>$full_ini_loc</code> file to <code>" . $shared_ini_loc . "</code>.";
+ } else {
+ if (!@file_exists($root_ini_file) && $rootpath != $shared_ini_loc && $full_ini_loc != $rootpath) {
+ $advice .= " Please try copying the <code>$full_ini_loc</code> file to <code>" . $rootpath . "</code>.";
+ }
+ $herepath = realpath($here);
+ $here_ini_file = $herepath . DIRECTORY_SEPARATOR . $ini_name;
+ if (!@file_exists($here_ini_file) && $herepath != $rootpath) {
+ $advice .= " It may be necessary to copy the <code>$full_ini_loc</code> file to <code>$herepath</code> and to all " . (is_ms_windows()?'folders':'directories') . ' in which you have encoded files';
+ }
}
}
+ $warnings[] = $advice;
+ }
+ } else {
+ if (own_php_ini_possible(true)) {
+ $warnings[] = "You may not be able to create your own ini files on your shared server. <br><strong>You might need to ask your server administrator to install the ionCube Loader for you.</strong>";
}
- $warnings[] = $advice;
}
} else {
$loader_dir_pair = correct_loader_wrong_location();
@@ -2724,6 +3135,9 @@
echo 'The following problem has been found with the ionCube Loader installation:';
$retry_message = "Please correct that error and $try_again.";
}
+ if (array_key_exists(ERROR_INI_USER_CANNOT_CREATE,$errors)) {
+ $retry_message = '';
+ }
echo make_list($errors,"ul");
echo '</div>';
if (!empty($warnings)) {
@@ -2742,7 +3156,9 @@
echo "<p>Please contact your server administrator about installing the ionCube Loader.</p>";
} else {
if (selinux_is_enabled()) {
- echo "<p>It appears that SELinux is enabled on your server. Please follow the instructions at <a target=\"_blank\" href=\"http://www.cuteshift.com/57/install-ioncube-loader-while-selinux-enabled/\">http://www.cuteshift.com/57/install-ioncube-loader-while-selinux-enabled/</a> for installing the ionCube Loader when SELinux is enabled.</p>";
+ echo "<p>It appears that SELinux is enabled on your server. This might be solved by running the command <code>restorecon [full path to loader file]</code> as root. If that does not solve the problem then please follow the instructions at <a target=\"_blank\" href=\"http://www.cuteshift.com/57/install-ioncube-loader-while-selinux-enabled/\">http://www.cuteshift.com/57/install-ioncube-loader-while-selinux-enabled/</a> for installing the ionCube Loader when SELinux is enabled.</p>";
+ } elseif (grsecurity_is_enabled()) {
+ echo "<p>It appears that grsecurity is enabled on your server. Please run the command, <code>execstack -c [full path to loader file]</code> and then restart your web server.</p>";
} else {
$sysinfo = get_sysinfo();
$ss = $sysinfo['SS'];
@@ -2844,7 +3260,7 @@
$lines['Ini Loader version'] = $loader_system['loader_version'];
}
}
- $lines["OS extra security"] = (selinux_is_enabled() || possibly_selinux())?"SELinux":"None";
+ $lines["OS extra security"] = (selinux_is_enabled() || possibly_selinux())?"SELinux":(grsecurity_is_enabled()?"Grsecurity":"None");
$lines['PHPRC is'] = $sys['PHPRC'];
$lines['INI DIR is'] = $sys['PHP_INI_DIR'];
$lines['Additional INI files'] = $sys['PHP_INI_ADDITIONAL'];
@@ -2854,6 +3270,12 @@
$lines["PHP uname"] = $ldinf['uname'];
$lines['Server word size is'] = $ldinf['wordsize'];
$lines['Disabled functions'] = ini_get('disable_functions');
+ $writeable_dirs = writeable_directories();
+ $lines['Writeable loader locations'] = (empty($writeable_dirs))?"<em>None</em>":join(", ",$writeable_dirs);
+ if (!empty($_SESSION['hostprovider'])) {
+ $lines['Hosting provider'] = $_SESSION['hostprovider'];
+ $lines['Provider URL'] = $_SESSION['hosturl'];
+ }
foreach ($lines as $h => $i) {
$v = (empty($i))?'<em>EMPTY</em>':$i;
echo '<tr><th>'. $h . ':</th>' . '<td>' . $v . '</td></tr>';
@@ -2892,6 +3314,10 @@
} elseif (!empty($_SESSION['not_go_daddy'])) {
$_SESSION['godaddy_root'] = '';
}
+ if (!empty($_SESSION['godaddy_root'])) {
+ $_SESSION['hostprovider'] = 'GoDaddy';
+ $_SESSION['hosturl'] = 'www.godaddy.com';
+ }
return $_SESSION['godaddy_root'];
}
@@ -2934,18 +3360,20 @@
heading();
- $inst_str = '<h4>GoDaddy Installation Instructions</h4>';
- $inst_str .= '<p>It appears that you are hosted with GoDaddy (<a target="_blank" href="http://www.godaddy.com/">www.godaddy.com</a>). ';
- $inst_str .= "If that is <b>not</b> the case then please <a href=\"$base&page=default&host=ngd\">click here to go to the main page of this installation wizard</a>.</p>";
- $inst_str .= "<p>If you have already installed the loader then please <a href=\"$base&page=loader_check\">click here to test the loader</a>.</p>";
+ $inst_str = '<h4>GoDaddy Installation Instructions</h4>';
+ $inst_str .= '<p>It appears that you are hosted with GoDaddy (<a target="_blank" href="http://www.godaddy.com/">www.godaddy.com</a>). ';
+ $inst_str .= "If that is <b>not</b> the case then please <a href=\"$base&page=default&host=ngd\">click here to go to the main page of this installation wizard</a>.</p>";
+ $inst_str .= "<p>If you have already installed the loader then please <a href=\"$base&page=loader_check\" onclick=\"showOverlay();\">click here to test the loader</a>.</p>";
- echo $inst_str;
+ echo $inst_str;
- if (is_ms_windows()) {
- GoDaddy_windows_instructions();
- } else {
- GoDaddy_linux_instructions($_SESSION['godaddy_root']);
- }
+ if (is_ms_windows()) {
+ GoDaddy_windows_instructions();
+ } else {
+ GoDaddy_linux_instructions($_SESSION['godaddy_root']);
+ }
+
+ send_stats('gd_default');
footer(true);
}
@@ -3004,10 +3432,41 @@
die("<b>ERROR:</b> <span class=\"error\">$m</span><p>Please help us improve this script by <a href=\"". SUPPORT_SITE . "\">reporting this error</a> and including the URL to the script so that we can test it.");
}
+function failsafe_get_self()
+{
+ $result = '';
+ $sfn = $_SERVER['SCRIPT_FILENAME'];
+ $dr = $_SERVER['DOCUMENT_ROOT'];
+ if (!empty($sfn) && !empty($dr)) {
+ if ($dr == '/' || $dr == '\\') {
+ $result = $sfn;
+ } else {
+ $drpos = strpos($sfn,$dr);
+ if ($drpos === 0) {
+ $drlen = strlen($dr);
+ $result = substr($sfn,$drlen);
+ }
+ }
+ $result = str_replace('\\','/',$result);
+ }
+ if (empty($result)) {
+ $result = DEFAULT_SELF;
+ }
+ return $result;
+}
+
function get_self()
{
if (empty($_SERVER['PHP_SELF'])) {
- return @$_SERVER['SCRIPT_NAME'];
+ if (empty($_SERVER['SCRIPT_NAME'])) {
+ if (empty($_SERVER['REQUEST_URI'])) {
+ return failsafe_get_self();
+ } else {
+ return $_SERVER['REQUEST_URI'];
+ }
+ } else {
+ return $_SERVER['SCRIPT_NAME'];
+ }
} else {
return $_SERVER['PHP_SELF'];
}
@@ -3051,18 +3510,34 @@
$self = get_self();
echo <<<EOT
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <title>ionCube Loader Wizard</title>
- <link rel="stylesheet" type="text/css" href="$self?page=css">
-</head>
-<body>
-<div id=header>
- <img src="?page=logo" alt="ionCube logo">
-</div>
-<div id=main>
- <h2>ionCube Loader Wizard</h2>
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN "http://www.w3.org/TR/html4/loose.dtd">
+ <html>
+ <head>
+ <title>ionCube Loader Wizard</title>
+ <link rel="stylesheet" type="text/css" href="$self?page=css">
+ <script type="text/javascript">
+ function showOverlay()
+ {
+ document.getElementById('overlay').style.display = 'block';
+ return true;
+ }
+
+ function hideOverlay()
+ {
+ document.getElementById('overlay').style.display = 'none';
+ return true;
+ }
+ </script>
+ </head>
+ <body onload="hideOverlay()">
+ <div id="overlay">
+ <div id="inner_overlay">Checking server configuration<br>Please wait</div>
+ </div>
+ <div id=header>
+ <img src="?page=logo" alt="ionCube logo">
+ </div>
+ <div id=main>
+<h2>ionCube Loader Wizard</h2>
EOT;
}
@@ -3071,7 +3546,7 @@
$self = get_self();
$base = get_base_address();
$default = get_default_address(false);
- $year = date("Y");
+ $year = gmdate("Y");
echo "</div>";
echo "<div id=\"footer\">" .
@@ -3157,8 +3632,8 @@
echo " | <a href=\"$base&page=extra&stype=$server_type_code\" target=\"extra\">additional</a>";
echo " | <a href=\"$base&page=system_info_archive&stype=$server_type_code\">info archive</a>";
}
- echo " | <a href=\"$default\">wizard start</a>";
- echo " | <a href=\"$base&page=loader_check\">loader test</a>";
+ echo " | <a href=\"$default\" onclick=\"showOverlay();\">wizard start</a>";
+ echo " | <a href=\"$base&page=loader_check\" onclick=\"showOverlay();\">loader test</a>";
echo ' | <a href="' . LOADERS_PAGE . '" target="loaders">loaders</a>';
echo "</div>\n";
@@ -3185,6 +3660,33 @@
LI {
margin-top: 10px;
}
+ #overlay {
+ display: block;
+ z-index: 100;
+ position: absolute;
+ top: 0;
+ left: 0;
+ padding: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+ background-color: white;
+ }
+ #inner_overlay {
+ display: block;
+ z-index: 100;
+ position: absolute;
+ font-size: 200%;
+ color: #660000;
+ top: 50%;
+ left: 25%;
+ width: 460px;
+ height: 460px;
+ line-height: 200%;
+ text-align: center;
+ vertical-align: middle;
+ }
+
#loading {
display: block;
position: absolute;
@@ -3244,6 +3746,24 @@
width: 75%;
}
+ #hostinginfo {
+ margin-top: 10px;
+ margin-left: 20px;
+ }
+ #hostinginfo table {
+ font-size: 1.00em;
+ }
+ #hostinginfo table td {
+ padding-right: 4px;
+ }
+ #hostinginfo input {
+ margin-top: 6px;
+ }
+
+ #hostinginfo label {
+ margin-left: 6px;
+ }
+
th {
text-align: left;
}
@@ -3257,7 +3777,6 @@
width: 75%;
}
-
.warning {
margin: 2ex 0;
border: 1px solid #FFBF00;
@@ -3266,6 +3785,15 @@
color: #000000;
width: 75%;
}
+
+ .success {
+ margin: 2ex 0;
+ border: 1px solid #006600;
+ padding: 1ex 1em;
+ background-color: #EEFFEE;
+ color: #000000;
+ width: 75%;
+ }
.error {
color: #FF0000;
|
|
Changed |
ioncube_loaders_lin_x86.tar.bz2/ioncube_loader_lin_4.1.so
^
|
|
Changed |
ioncube_loaders_lin_x86.tar.bz2/ioncube_loader_lin_4.2.so
^
|
|
Changed |
ioncube_loaders_lin_x86.tar.bz2/ioncube_loader_lin_4.3.so
^
|
|
Changed |
ioncube_loaders_lin_x86.tar.bz2/ioncube_loader_lin_4.3_ts.so
^
|
|
Changed |
ioncube_loaders_lin_x86.tar.bz2/ioncube_loader_lin_4.4.so
^
|
|
Changed |
ioncube_loaders_lin_x86.tar.bz2/ioncube_loader_lin_4.4_ts.so
^
|
|
Changed |
ioncube_loaders_lin_x86.tar.bz2/ioncube_loader_lin_5.0.so
^
|
|
Changed |
ioncube_loaders_lin_x86.tar.bz2/ioncube_loader_lin_5.0_ts.so
^
|
|
Changed |
ioncube_loaders_lin_x86.tar.bz2/ioncube_loader_lin_5.1.so
^
|
|
Changed |
ioncube_loaders_lin_x86.tar.bz2/ioncube_loader_lin_5.1_ts.so
^
|
|
Changed |
ioncube_loaders_lin_x86.tar.bz2/ioncube_loader_lin_5.2.so
^
|
|
Changed |
ioncube_loaders_lin_x86.tar.bz2/ioncube_loader_lin_5.2_ts.so
^
|
|
Changed |
ioncube_loaders_lin_x86.tar.bz2/ioncube_loader_lin_5.3.so
^
|
|
Changed |
ioncube_loaders_lin_x86.tar.bz2/ioncube_loader_lin_5.3_ts.so
^
|
[-]
[+]
|
Changed |
ioncube_loaders_lin_x86.tar.bz2/loader-wizard.php
^
|
@@ -5,7 +5,7 @@
*
* ionCube is a registered trademark of ionCube Ltd.
*
- * Copyright (c) ionCube Ltd. 2002-2010
+ * Copyright (c) ionCube Ltd. 2002-2011
*/
@@ -30,6 +30,8 @@
define ('ERROR_INI_NOT_FOUND',207);
define ('ERROR_INI_NOT_READABLE',208);
define ('ERROR_INI_MULTIPLE_IC_LOADER_LINES',209);
+define ('ERROR_INI_USER_INI_NOT_FOUND',210);
+define ('ERROR_INI_USER_CANNOT_CREATE',211);
define ('ERROR_LOADER_UNEXPECTED_NAME',301);
define ('ERROR_LOADER_NOT_READABLE',302);
define ('ERROR_LOADER_PHP_MISMATCH',303);
@@ -77,17 +79,21 @@
LOADER_VERSION_URL . '?item=loader-platforms');
define ('LOADER_LATEST_VERSIONS_URL',
LOADER_VERSION_URL . '?item=loader-versions');
+define ('WIZARD_STATS_URL',
+ 'http://www.ioncube.com/feeds/stats/wizard.php');
define ('IONCUBE_DOWNLOADS_SERVER',
'http://downloads2.ioncube.com/loader_downloads');
define ('IONCUBE_CONNECT_TIMEOUT',4);
+define ('DEFAULT_SELF','/ioncube/loader-wizard.php');
define ('LOADER_NAME_CHECK',true);
define ('LOADER_EXTENSION_NAME','ionCube Loader');
define ('LOADER_SUBDIR','ioncube');
define ('WINDOWS_IIS_LOADER_DIR', 'system32');
-define ('ADDITIONAL_INI_FILE_NAME','aa_ioncube.ini');
+define ('ADDITIONAL_INI_FILE_NAME','20ioncube.ini');
define ('UNIX_SYSTEM_LOADER_DIR','/usr/local/ioncube');
define ('RECENT_LOADER_VERSION','3.1.24');
+define ('LATEST_LOADER_MAJOR_VERSION',4);
define ('LOADERS_PACKAGE_PREFIX','ioncube_loaders_');
define ('SESSION_LIFETIME_MINUTES',360);
define ('WIZARD_EXPIRY_MINUTES',10080);
@@ -96,9 +102,27 @@
run();
+if(!function_exists('http_build_query')) {
+ function http_build_query( $formdata, $numeric_prefix = null, $key = null ) {
+ $res = array();
+ foreach ((array)$formdata as $k=>$v) {
+ $tmp_key = urlencode(is_int($k) ? $numeric_prefix.$k : $k);
+ if ($key) $tmp_key = $key.'['.$tmp_key.']';
+ if ( is_array($v) || is_object($v) ) {
+ $res[] = http_build_query($v, null , $tmp_key);
+ } else {
+ $res[] = $tmp_key."=".urlencode($v);
+ }
+ }
+ $separator = ini_get('arg_separator.output');
+ return implode($separator, $res);
+ }
+}
+
+
function script_version()
{
- return "2.18";
+ return "2.29";
}
function retrieve_latest_wizard_version()
@@ -217,7 +241,7 @@
$v = php_version();
return ((($v['major'] == 4) && ($v['minor'] >= 1)) ||
- (($v['major'] == 5) && (($v['minor'] >= 1) || ($v['release'] >= 5))));
+ (($v['major'] == 5) && (($v['minor'] >= 1) || ($v['release'] >= 3))));
}
function is_php_version_or_greater($major,$minor,$release = 0)
@@ -285,11 +309,11 @@
$platforms[] = array('os'=>'fre', 'os_human'=>'FreeBSD 6', 'os_mod'=>'_6', 'arch'=>'x86', 'dirname'=>'freebsd_i386-6.2', 'us1-dir'=>'FreeBSD/v6/x86');
- $platforms[] = array('os'=>'fre', 'os_human'=>'FreeBSD 6', 'os_mod'=>'_6', 'arch'=>'x86-64', 'dirname'=>'freebsd_amd64-6.1', 'us1-dir'=>'FreeBSD/v6/AMD64');
+ $platforms[] = array('os'=>'fre', 'os_human'=>'FreeBSD 6', 'os_mod'=>'_6', 'arch'=>'x86-64', 'dirname'=>'freebsd_amd64-6.2', 'us1-dir'=>'FreeBSD/v6/AMD64');
- $platforms[] = array('os'=>'fre', 'os_human'=>'FreeBSD 7', 'os_mod'=>'_7', 'arch'=>'x86', 'dirname'=>'freebsd_i386-7.1', 'us1-dir'=>'FreeBSD/v7/x86');
- $platforms[] = array('os'=>'fre', 'os_human'=>'FreeBSD 7', 'os_mod'=>'_7', 'arch'=>'x86-64', 'dirname'=>'freebsd_amd64-7.2', 'us1-dir'=>'FreeBSD/v7/AMD64');
+ $platforms[] = array('os'=>'fre', 'os_human'=>'FreeBSD 7', 'os_mod'=>'_7', 'arch'=>'x86', 'dirname'=>'freebsd_i386-7.3', 'us1-dir'=>'FreeBSD/v7/x86');
+ $platforms[] = array('os'=>'fre', 'os_human'=>'FreeBSD 7', 'os_mod'=>'_7', 'arch'=>'x86-64', 'dirname'=>'freebsd_amd64-7.3', 'us1-dir'=>'FreeBSD/v7/AMD64');
$platforms[] = array('os'=>'fre', 'os_human'=>'FreeBSD 8', 'os_mod'=>'_8', 'arch'=>'x86', 'dirname'=>'freebsd_i386-8.0', 'us1-dir'=>'FreeBSD/v8/x86');
@@ -301,6 +325,7 @@
$platforms[] = array('os'=>'ope', 'os_human'=>'OpenBSD 4.2', 'os_mod'=>'_4.2', 'arch'=>'x86', 'dirname'=>'openbsd_i386-4.2', 'us1-dir'=>'OpenBSD/x86');
$platforms[] = array('os'=>'ope', 'os_human'=>'OpenBSD 4.5', 'os_mod'=>'_4.5', 'arch'=>'x86', 'dirname'=>'openbsd_i386-4.5', 'us1-dir'=>'OpenBSD/x86');
+ $platforms[] = array('os'=>'ope', 'os_human'=>'OpenBSD 4.6', 'os_mod'=>'_4.6', 'arch'=>'x86', 'dirname'=>'openbsd_i386-4.6', 'us1-dir'=>'OpenBSD/x86');
$platforms[] = array('os'=>'ope', 'os_human'=>'OpenBSD 4.7', 'os_mod'=>'_4.7', 'arch'=>'x86-64', 'dirname'=>'openbsd_amd64-4.7', 'us1-dir' => 'OpenBSD/x86_64');
@@ -449,16 +474,92 @@
return $arch;
}
+function uname($part = 'a')
+{
+ $result = '';
+ if (!function_is_disabled('php_uname')) {
+ $result = @php_uname($part);
+ } elseif (function_exists('posix_uname') && !function_is_disabled('posix_uname')) {
+ $posix_equivs = array(
+ 'm' => 'machine',
+ 'n' => 'nodename',
+ 'r' => 'release',
+ 's' => 'sysname'
+ );
+ $puname = @posix_uname();
+ if ($part == 'a' || !array_key_exists($part,$posix_equivs)) {
+ $result = join(' ',$puname);
+ } else {
+ $result = $puname[$posix_equivs[$part]];
+ }
+ } else {
+ if (!function_is_disabled('phpinfo')) {
+ ob_start();
+ phpinfo(INFO_GENERAL);
+ $pinfo = ob_get_contents();
+ ob_end_clean();
+ if (preg_match('~System.*?(</B></td><TD ALIGN="left">| => |v">)([^<]*)~i',$pinfo,$match)) {
+ $uname = $match[2];
+ if ($part == 'r') {
+ if (!empty($uname) && preg_match('/\S+\s+\S+\s+([0-9.]+)/',$uname,$matchver)) {
+ $result = $matchver[1];
+ } else {
+ $result = '';
+ }
+ } else {
+ $result = $uname;
+ }
+ }
+ } else {
+ $result = '';
+ }
+ }
+ return $result;
+}
+
+function calc_word_size($os_code)
+{
+ $wordsize = null;
+ if ('win' === $os_code) {
+ ob_start();
+ phpinfo(INFO_GENERAL);
+ $pinfo = ob_get_contents();
+ ob_end_clean();
+ if (preg_match('~Compiler.*?(</B></td><TD ALIGN="left">| => |v">)([^<]*)~i',$pinfo,$compmatch)) {
+ if (preg_match("/(VC[0-9]+)/i",$compmatch[2],$vcmatch)) {
+ $compiler = strtoupper($vcmatch[1]);
+ } else {
+ $compiler = 'VC6';
+ }
+ } else {
+ $compiler = 'VC6';
+ }
+ if ($compiler === 'VC9') {
+ if (isset($_ENV['PROCESSOR_ARCHITECTURE']) && preg_match('~(amd64|x86-64|x86_64)~i',$_ENV['PROCESSOR_ARCHITECTURE'])) {
+ if (preg_match('~Configure Command.*?(</B></td><TD ALIGN="left">| => |v">)([^<]*)~i',$pinfo,$confmatch)) {
+ if (preg_match('~(x64|lib64|system64)~i',$confmatch[2])) {
+ $wordsize = 64;
+ }
+ }
+ }
+ }
+ }
+ if (empty($wordsize)) {
+ $wordsize = ((-1^0xffffffff)?64:32);
+ }
+ return $wordsize;
+}
+
function required_loader($unamestr = '')
{
- $un = empty($unamestr)?php_uname():$unamestr;
+ $un = empty($unamestr)?uname():$unamestr;
$php_major_version = substr(PHP_VERSION,0,3);
$os_name = substr($un,0,strpos($un,' '));
$os_code = empty($os_name)?'':strtolower(substr($os_name,0,3));
- $wordsize = ((-1^0xffffffff) ? 64 : 32);
+ $wordsize = calc_word_size($os_code);
$arch = required_loader_arch($un,$os_code,$wordsize);
if (!is_string($arch)) {
@@ -470,7 +571,7 @@
}
$os_ver = '';
- if (preg_match('/([0-9.]+)/',php_uname('r'),$match)) {
+ if (preg_match('/([0-9.]+)/',uname('r'),$match)) {
$os_ver = $match[1];
}
$os_ver_parts = preg_split('@\.@',$os_ver);
@@ -582,7 +683,7 @@
}
}
if (!empty($php_ini_path)) {
- $real_path = realpath($php_ini_path);
+ $real_path = @realpath($php_ini_path);
if (false !== $real_path) {
$php_ini_path = $real_path;
}
@@ -761,17 +862,32 @@
return $se_enabled;
}
+function grsecurity_is_enabled()
+{
+ $gr_enabled = false;
+
+ if (!is_ms_windows()) {
+ $cmd = @shell_exec('gradm -S');
+ $gr_enabled = preg_match('/enabled/i',$cmd);
+ }
+
+ return $gr_enabled;
+}
+
function threaded_and_not_cgi()
{
$sys = get_sysinfo();
return($sys['THREAD_SAFE'] && !$sys['IS_CGI']);
}
-function is_restricted_server()
+function is_restricted_server($only_safe_mode = false)
{
$disable_functions = ini_get('disable_functions');
$open_basedir = ini_get('open_basedir');
- return (ini_get('safe_mode') || !empty($disable_functions) || !empty($open_basedir) || selinux_is_enabled());
+ $php_restrictions = !empty($disable_functions) || !empty($open_basedir);
+ $system_restrictions = selinux_is_enabled() || grsecurity_is_enabled();
+ $non_safe_mode_restrictions = $php_restrictions || $system_restrictions;
+ return (ini_get('safe_mode') || (!$only_safe_mode && $non_safe_mode_restrictions));
}
function server_restriction_warnings()
@@ -799,10 +915,10 @@
return $warnings;
}
-function own_php_ini_possible()
+function own_php_ini_possible($only_safe_mode = false)
{
$sysinfo = get_sysinfo();
- return ($sysinfo['CGI_CLI'] && !is_ms_windows() && !is_restricted_server());
+ return ($sysinfo['CGI_CLI'] && !is_ms_windows() && !is_restricted_server($only_safe_mode));
}
function extension_dir()
@@ -829,12 +945,12 @@
function extension_dir_path()
{
- return realpath(extension_dir());
+ return @realpath(extension_dir());
}
function get_loader_name()
{
- $u = php_uname();
+ $u = uname();
$os = substr($u,0,strpos($u,' '));
$os_key = strtolower(substr($u,0,3));
@@ -870,7 +986,12 @@
function get_default_loader_dir_webspace()
{
- return ($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . LOADER_SUBDIR);
+ $cgi_bin_dir = $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "cgi-bin";
+ if (is_dir($cgi_bin_dir)) {
+ return $cgi_bin_dir;
+ } else {
+ return ($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . LOADER_SUBDIR);
+ }
}
function get_loader_location($loader_dir = '')
@@ -1001,17 +1122,34 @@
$ldloc = '';
$sysinfo = get_sysinfo();
$ini_file_list = array_merge(array($sysinfo['PHP_INI']),get_additional_ini_files());
- $errors = array();
+ $server_type = find_server_type();
+ $shared_server = SERVER_SHARED == $server_type;
+ $ini_files_not_found = array();
foreach ($ini_file_list as $f) {
$ldloc = get_loader_location_from_ini($f);
if (array_key_exists(ERROR_INI_ZE_LINE_NOT_FOUND,$ldloc['errors'])) {
unset($ldloc['errors'][ERROR_INI_ZE_LINE_NOT_FOUND]);
}
- $errors = array_merge($errors,$ldloc['errors']);
+ if ($shared_server && array_key_exists(ERROR_INI_NOT_FOUND,$ldloc['errors'])) {
+ if (false == user_ini_space_path($f)) {
+ $ldloc['errors'][ERROR_INI_NOT_FOUND] = "A system ini file cannot be found or read by the Wizard - you cannot do anything about this on your shared server.";
+ } else {
+ $ldloc['errors'][ERROR_INI_USER_INI_NOT_FOUND] = $ldloc['errors'][ERROR_INI_NOT_FOUND];
+ }
+ } elseif (array_key_exists(ERROR_INI_NOT_FOUND,$ldloc['errors'])) {
+ $ini_files_not_found[] = $f;
+ }
if (!empty($ldloc['location'])) {
break;
}
}
+ if (!empty($ini_files_not_found)) {
+ $plural = (count($ini_files_not_found) > 1)?"s":"";
+ $ldloc['errors'][ERROR_INI_NOT_FOUND] = "The following ini file$plural could not be found by the Wizard: " . join(',',$ini_files_not_found);
+ if (is_restricted_server()) {
+ $ldloc['errors'][ERROR_INI_NOT_FOUND] .= "<br> This may be due to server restrictions in place.";
+ }
+ }
if (empty($ldloc['location'])) {
$ldloc['errors'][ERROR_INI_ZE_LINE_NOT_FOUND] = "The necessary zend_extension line could not be found in the configuration.";
}
@@ -1026,7 +1164,7 @@
if (@file_exists($suggested_loader_path)) {
$location = $suggested_loader_path;
} elseif (@file_exists($loader_name)) {
- $location = realpath($loader_name);
+ $location = @realpath($loader_name);
} else {
$ld_loc = get_loader_location();
if (@file_exists($ld_loc)) {
@@ -1078,6 +1216,8 @@
{
$old_version = true;
$liv = "";
+ $lv = "";
+ $mv = 0;
if (function_exists('ioncube_loader_iversion')) {
$liv = ioncube_loader_iversion();
$lv = sprintf("%d.%d.%d", $liv / 10000, ($liv / 100) % 100, $liv % 100);
@@ -1094,8 +1234,9 @@
} else {
$old_version = $latest_version;
}
+ $mv = $cur_parts[0];
}
- return array($lv,$old_version);
+ return array($lv,$mv,$old_version);
}
function default_loader_version_info()
@@ -1113,7 +1254,7 @@
$platform_info = get_platforminfo();
$loader = get_loaderinfo();
$multiple_os_versions = false;
- if (array_key_exists('osvariants',$loader) && is_array($loader['osvariants'])) {
+ if (is_array($loader) && array_key_exists('osvariants',$loader) && is_array($loader['osvariants'])) {
$versions = array_values($loader['osvariants']);
$multiple_os_versions = !empty($versions[0]);
}
@@ -1308,6 +1449,28 @@
return (LOADERS_PACKAGE_PREFIX . 'win' . '_' . ($sys['THREAD_SAFE']?'':'nonts_') . strtolower($sys['PHP_COMPILER']) . '_' . 'x86');
}
+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);
+}
+
function loader_download_instructions()
{
$sysinfo = get_sysinfo();
@@ -1316,11 +1479,12 @@
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:';
- } else {
- echo '<li>Download one of the following archives of Windows non-TS x86 Loaders:';
+ $download_str = '<li>Download one of the following archives of Windows ' . $sysinfo['PHP_COMPILER'];
+ if (!$sysinfo['THREAD_SAFE']) {
+ $download_str .= ' non-TS';
}
+ $download_str .= ' x86 Loaders:';
+ echo $download_str;
$basename = windows_package_name();
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
@@ -1330,21 +1494,7 @@
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 = false;
- if (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'];
- }
+ list($basename,$multiple_os_versions) = unix_package_name();
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['osnamequal']} 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.";
@@ -1383,36 +1533,68 @@
return $parent_dir;
}
-function loader_install_dir($server_type)
+function unix_install_dir()
{
- if (SERVER_SHARED == $server_type && own_php_ini_possible()) {
- $loader_dir = get_default_loader_dir_webspace();
+ $ext_dir = extension_dir_path();
+ $cur_dir = @realpath('.');
+ if (empty($ext_dir) || $ext_dir == $cur_dir) {
+ $loader_dir = UNIX_SYSTEM_LOADER_DIR;
} else {
- if (is_ms_windows()) {
- $sysinfo = get_sysinfo();
- if ($sysinfo['SS'] == 'IIS') {
- if (false === ($ext_dir = extension_dir_path())) {
- $parent_dir = ini_dir();
- $ext_dir = $parent_dir . '\\ext';
- if (!empty($parent_dir) && @file_exists($ext_dir)) {
- $loader_dir = $ext_dir;
- } else {
- $loader_dir = $_SERVER['windir'] . '\\' . WINDOWS_IIS_LOADER_DIR;
- }
- } else {
- $loader_dir = $ext_dir;
- }
+ $loader_dir = $ext_dir;
+ }
+ return $loader_dir;
+}
+
+function windows_install_dir()
+{
+ $sysinfo = get_sysinfo();
+ if ($sysinfo['SS'] == 'IIS') {
+ if (false === ($ext_dir = extension_dir_path())) {
+ $parent_dir = ini_dir();
+ $ext_dir = $parent_dir . '\\ext';
+ if (!empty($parent_dir) && @file_exists($ext_dir)) {
+ $loader_dir = $ext_dir;
} else {
- $parent_dir = ini_dir();
- $loader_dir = $parent_dir . '\\' . 'ioncube';
+ $loader_dir = $_SERVER['windir'] . '\\' . WINDOWS_IIS_LOADER_DIR;
}
} else {
- $loader_dir = UNIX_SYSTEM_LOADER_DIR;
+ $loader_dir = $ext_dir;
}
+ } else {
+ $parent_dir = ini_dir();
+ $loader_dir = $parent_dir . '\\' . 'ioncube';
+ }
+ return $loader_dir;
+}
+
+function loader_install_dir($server_type)
+{
+ if (SERVER_SHARED == $server_type && own_php_ini_possible()) {
+ $loader_dir = get_default_loader_dir_webspace();
+ } elseif (is_ms_windows()) {
+ $loader_dir = windows_install_dir();
+ } else {
+ $loader_dir = unix_install_dir();
}
return $loader_dir;
}
+function writeable_directories()
+{
+ $root_path = @realpath($_SERVER['DOCUMENT_ROOT']);
+ $above_root_path = @realpath($_SERVER['DOCUMENT_ROOT'] . "/..");
+ $root_path_cgi_bin = @realpath($_SERVER['DOCUMENT_ROOT'] . "/cgi-bin");
+ $above_root_cgi_bin = @realpath($_SERVER['DOCUMENT_ROOT'] . "/../cgi-bin");
+
+ $paths = array();
+ foreach (array($root_path,$above_root_path,$root_path_cgi_bin,$above_root_cgi_bin) as $p) {
+ if (is_writeable($p)) {
+ $paths[] = $p;
+ }
+ }
+ return $paths;
+}
+
function loader_install_instructions($server_type,$loader_dir = '')
{
if (empty($loader_dir)) {
@@ -1445,19 +1627,51 @@
return $zend_extension_lines;
}
+function user_ini_base()
+{
+ $doc_root_path = realpath($_SERVER['DOCUMENT_ROOT']);
+ $above_root_path = @realpath($_SERVER['DOCUMENT_ROOT'] . "/..");
+ if (!empty($above_root_path) && is_writeable($above_root_path)) {
+ $start_path = $above_root_path;
+ } else {
+ $start_path = $doc_root_path;
+ }
+ return $start_path;
+}
+
+function user_ini_space_path($file)
+{
+ $user_base = user_ini_base();
+ $fpath = @realpath($file);
+ if (!empty($fpath) && (0 === strpos($fpath,$user_base))) {
+ return $fpath;
+ } else {
+ return false;
+ }
+}
+
+function default_ini_path()
+{
+ $cgi_bin_dir = @realpath($_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . "cgi-bin");
+ if (is_dir($cgi_bin_dir)) {
+ return $cgi_bin_dir;
+ } else {
+ return (realpath($_SERVER['DOCUMENT_ROOT']));
+ }
+}
+
function shared_ini_location()
{
$phprc = getenv('PHPRC');
- $doc_root_path = realpath($_SERVER['DOCUMENT_ROOT']);
if (!empty($phprc)) {
- $phprc_path = realpath($phprc);
- if (0 === strpos($phprc_path,$doc_root_path)) {
+ $phprc_path = user_ini_space_path($phprc);
+ if (false !== $phprc_path) {
return $phprc_path;
} else {
- return $doc_root_path;
+ return default_ini_path();
}
} else {
- return $doc_root_path;
+ return default_ini_path();
}
}
@@ -1487,11 +1701,11 @@
$zend_extension_lines = zend_extension_lines($loader_dir);
if (SERVER_SHARED == $server_type && own_php_ini_possible()) {
- $html_dir = shared_ini_location();
- $php_ini_path = $html_dir . DIRECTORY_SEPARATOR . $php_ini_name;
+ $ini_dir = shared_ini_location();
+ $php_ini_path = $ini_dir . DIRECTORY_SEPARATOR . $php_ini_name;
if (@file_exists($php_ini_path)) {
- $edit_line = "<li>Edit the <code>$php_ini_name</code> in the <code>$html_dir</code> directory";
- if (zend_extension_line_missing($php_ini_path) && is_writeable($php_ini_path) && is_writeable($html_dir)) {
+ $edit_line = "<li>Edit the <code>$php_ini_name</code> in the <code>$ini_dir</code> directory";
+ if (zend_extension_line_missing($php_ini_path) && is_writeable($php_ini_path) && is_writeable($ini_dir)) {
if (function_exists('file_get_contents')) {
$ini_strs = @file_get_contents($php_ini_path);
} else {
@@ -1514,8 +1728,8 @@
echo $edit_line;
}
} else {
- $download_ini_file = "<li><a href=\"$base&page=phpconfig&ininame=$php_ini_name&stype=$server_type_code&download=1&prepend=1\">Save this <code>$php_ini_name</code> file</a> and upload it to <code>$html_dir</code> (full path on your server).";
- if (is_writeable($html_dir)) {
+ $download_ini_file = "<li><a href=\"$base&page=phpconfig&ininame=$php_ini_name&stype=$server_type_code&download=1&prepend=1\">Save this <code>$php_ini_name</code> file</a> and upload it to <code>$ini_dir</code> (full path on your server).";
+ if (is_writeable($ini_dir)) {
$fh = @fopen($php_ini_path,"wb");
if ($fh !== false) {
foreach ($zend_extension_lines as $zl) {
@@ -1531,7 +1745,7 @@
fwrite($fh,$ini_strs);
}
fclose($fh);
- echo "<li>A <code>$php_ini_name</code> file has been created for you in <code>$html_dir</code>.";
+ echo "<li>A <code>$php_ini_name</code> file has been created for you in <code>$ini_dir</code>.";
} else {
echo $download_ini_file;
}
@@ -1582,7 +1796,7 @@
echo "<li>Restart the server software.</li>";
}
- echo "<li>When the server software has restarted, <a href=\"$base&page=loader_check\">click here to test the Loader</a>.</li>";
+ echo "<li>When the server software has restarted, <a href=\"$base&page=loader_check\" onclick=\"showOverlay();\">click here to test the Loader</a>.</li>";
if ($sysinfo['SS'] == 'Apache' && !is_ms_windows()) {
echo '<li>If the Loader installation failed, check the Apache error log file for errors and see our guide to <a target="unix_errors" href="'. UNIX_ERRORS_URL . '">Unix related errors</a>.</li>';
@@ -1592,7 +1806,7 @@
function shared_test_instructions()
{
$base = get_base_address();
- echo "<li><a href=\"$base&page=loader_check\">Click here to test the Loader</a>.</li>";
+ echo "<li><a href=\"$base&page=loader_check\" onclick=\"showOverlay();\">Click here to test the Loader</a>.</li>";
}
function link_to_php_ini_instructions()
@@ -1666,11 +1880,15 @@
{
$base = get_base_address();
$server_type_code = server_type_code();
+ $server_type = find_server_type();
$resources = array(
- '<a target="_blank" href="' . LOADERS_FAQ_URL . '">ionCube Loaders FAQ</a>',
- '<a target="_blank" href="' . LOADER_FORUM_URL . '">ionCube Loader Forum</a>',
- '<a target="_blank" href="' . SUPPORT_SITE . 'index.php?department=3&subject=ionCube+Loader+installation+problem&message='. support_ticket_information($error_list) . '">Raise a support ticket through our helpdesk</a>');
- if (SERVER_LOCAL == find_server_type()) {
+ '<a target="_blank" href="' . LOADERS_FAQ_URL . '">ionCube Loaders FAQ</a>',
+ '<a target="_blank" href="' . LOADER_FORUM_URL . '">ionCube Loader Forum</a>'
+ );
+ if (SERVER_SHARED != $server_type || own_php_ini_possible(true)) {
+ $resources[2] = '<a target="_blank" href="' . SUPPORT_SITE . htmlentities('index.php?department=3&subject=ionCube+Loader+installation+problem&message='. support_ticket_information($error_list)) . '">Raise a support ticket through our helpdesk</a>';
+ }
+ if (SERVER_LOCAL == $server_type) {
$resources[2] .= "<br><span id=\"download-archive\">Once the support ticket has been created, please";
$resources[2] .= " <a href=\"$base&page=system_info_archive&stype=$server_type_code\">click here to get an archive of system information</a>.<br>";
$resources[2] .= "Please attach that archive of system information to the ticket that you have created.</span>";
@@ -1821,6 +2039,8 @@
$info_lines["Operating system"] = $ld['osname'] . ' ' . $ld['osver'];
if (selinux_is_enabled() || possibly_selinux()) {
$info_lines["Security enhancements"] = "SELinux";
+ } elseif (grsecurity_is_enabled()) {
+ $info_lines["Security enhancements"] = "Grsecurity";
} else {
$info_lines["Security enhancements"] = "None";
}
@@ -1862,6 +2082,10 @@
$info_lines["Loader path"] = "LOADER PATH NOT FOUND";
}
$server_type_code = server_type_code();
+ if (!empty($_SESSION['hostprovider'])) {
+ $info_lines['Hosting provider'] = $_SESSION['hostprovider'];
+ $info_lines['Provider URL'] = $_SESSION['hosturl'];
+ }
$info_lines["Wizard script path"] = '[url]http://' . $_SERVER["HTTP_HOST"] . get_self() . '?stype='. $server_type_code . '[/url]';
$ticket_strs[] = "[table]";
foreach ($info_lines as $h => $i) {
@@ -1874,7 +2098,60 @@
$ticket_strs[] = "PLEASE ENTER ANY ADDITIONAL INFORMATION BELOW\r\n";
$support_ticket_str = join('',$ticket_strs);
- return rawurlencode($support_ticket_str);
+ return urlencode($support_ticket_str);
+}
+
+function wizard_stats_data($page_id)
+{
+ $data = array();
+
+ try_runtime_loading_if_applicable();
+ $sysinfo = get_sysinfo();
+ $ldinfo = get_loaderinfo();
+
+ $data['sessionid'] = session_id();
+ $data['wizard_version'] = script_version();
+ $data['server_type'] = server_type_code();
+ $data['hostprovider'] = (isset($_SESSION['hostprovider']))?$_SESSION['hostprovider']:'';
+ $data['hosturl'] = (isset($_SESSION['hosturl']))?$_SESSION['hosturl']:'';
+ $data['page_id'] = $page_id;
+ $data['loader_state'] = (extension_loaded(LOADER_EXTENSION_NAME))?'installed':'failure';
+ $data['ini_location'] = $sysinfo['PHP_INI'];
+ $data['is_cgi'] = ($sysinfo['IS_CGI'])?"yes":"no";
+ $data['is_ts'] = ($sysinfo['THREAD_SAFE'])?"yes":"no";
+ $data['arch'] = $ldinfo['arch'];
+ $data['php_version'] = PHP_VERSION;
+ $data['os'] = $ldinfo['osname'];
+ $data['word_size'] = $ldinfo['wordsize'];
+ $data['referrer'] = $_SERVER["HTTP_HOST"] . get_self();
+
+ return $data;
+}
+
+function send_stats($page_id = 'default')
+{
+ $server_type = find_server_type();
+ $res = false;
+
+ if (SERVER_LOCAL != $server_type) {
+ $stats_data = wizard_stats_data($page_id);
+
+ if (!isset($_SESSION['stats_sent'][$page_id][$stats_data['loader_state']])) {
+ $url = WIZARD_STATS_URL;
+
+ if (!empty($stats_data)) {
+ $qparams = http_build_query($stats_data);
+ $url .= '?' . $qparams;
+ $res = remote_file_contents($url);
+ }
+ $_SESSION['stats_sent'][$page_id][$stats_data['loader_state']] = 1;
+ } else {
+ $res = true;
+ }
+ } else {
+ $res = 'LOCAL';
+ }
+ return $res;
}
function os_arch_string_check($loader_str)
@@ -2014,7 +2291,7 @@
} else {
$errors[ERROR_LOADER_PHP_VERSION_UNKNOWN] = "The PHP version for the loader cannot be determined - please check that you have a valid ionCube Loader.";
}
- $errors = array_merge($errors,os_arch_string_check($loader_strs));
+ $errors += os_arch_string_check($loader_strs);
return $errors;
}
@@ -2029,8 +2306,12 @@
php_ini_install_shared();
}
} else {
- list($lv,$is_old) = ioncube_loader_version_information();
+ list($lv,$mv,$newer_version) = ioncube_loader_version_information();
echo "<p>The ionCube Loader $lv has been successfully installed.</p>";
+ $is_legacy_loader = loader_major_version_instructions($mv);
+ if ($is_legacy_loader) {
+ loader_upgrade_instructions($lv,$newer_version);
+ }
successful_install_end_instructions($rtl_path);
}
}
@@ -2156,6 +2437,15 @@
unset($_SESSION['not_go_daddy']);
unset($_SESSION['use_ini_method']);
unset($_SESSION['server_type']);
+ } else {
+ $stype = get_request_parameter('stype');
+ $hostprovider = get_request_parameter('hostprovider');
+ $hosturl = get_request_parameter('hosturl');
+ if (!empty($hostprovider)) {
+ $_SESSION['hostprovider'] = $hostprovider;
+ $_SESSION['hosturl'] = $hosturl;
+ }
+ $server_type = find_server_type($stype,false,true);
}
if ($session_ok && !$timeout && !isset($_SESSION['initial_run']) && empty($page)) {
$_SESSION['initial_run'] = 1;
@@ -2365,11 +2655,14 @@
$rtl = try_runtime_loading_if_applicable();
- if (extension_loaded($loader_extension)) {
+ $server_type = find_server_type();
+
+ if (extension_loaded($loader_extension) && $server_type != SERVER_UNKNOWN) {
loader_already_installed($rtl);
} else {
loader_not_installed();
}
+ send_stats('default');
footer($wizard_update);
}
@@ -2405,29 +2698,75 @@
uninstall_wizard_instructions();
}
+function loader_major_version_instructions($mv)
+{
+ if ($mv < LATEST_LOADER_MAJOR_VERSION) {
+ echo "<p><strong>The installed version of the Loader cannot run files produced by the most recent ionCube Encoder.</strong>";
+ echo " You will need a version " . LATEST_LOADER_MAJOR_VERSION . " ionCube Loader to run such files.</p>";
+ }
+ return ($mv < LATEST_LOADER_MAJOR_VERSION);
+}
+
function loader_already_installed($rtl = null)
{
- list($lv,$old_version) = ioncube_loader_version_information();
- echo "<p>";
- if ($old_version) {
- echo 'The ionCube Loader ' . $lv . ' is already installed but it is an old version.';
- echo ' It is recommended that the Loader be updated to the latest version';
- if (is_string($old_version)) {
- echo ", $old_version,";
- }
- echo ' from the <a href="' . LOADERS_PAGE . '">ionCube Loaders page</a>';
- if (!is_string($old_version)) {
- echo ' if one is available for your platform';
- }
- echo '.';
+ list($lv,$mv,$newer_version) = ioncube_loader_version_information();
+ echo '<div class="success">';
+ echo '<h4>Loader Installed</h4>';
+ if ($newer_version) {
+ echo '<p>The ionCube Loader version ' . $lv . ' is <strong>already installed</strong> but it is an old version.';
+ echo ' It is recommended that the Loader be upgraded to the latest version if possible.</p>';
+ $know_latest_version = is_string($newer_version);
+ $is_legacy_loader = loader_major_version_instructions($mv);
+ echo '</div>';
+ loader_upgrade_instructions($lv,$newer_version);
} else {
- echo 'The ionCube Loader version ' . $lv . ' is already installed and encoded files should run without problems.';
+ echo '<p>The ionCube Loader version ' . $lv . ' is already installed and encoded files should run without problems.</p>';
+ echo '</div>';
+ $is_legacy_loader = loader_major_version_instructions($mv,true);
+ if ($is_legacy_loader) {
+ loader_upgrade_instructions($lv,true);
+ }
}
- echo "</p>";
successful_install_end_instructions($rtl);
}
+function loader_upgrade_instructions($installed_version,$newer_version)
+{
+ if ($newer_version) {
+ echo '<div class="panel">';
+ echo '<h4>Loader Upgrade Instructions</h4>';
+ $restart_needed = true;
+ $server_type = find_server_type();
+ if ($server_type == SERVER_SHARED || $server_type == SERVER_UNKNOWN) {
+ $loader_path = find_loader(true);
+ if (!is_string($loader_path) || false === user_ini_space_path($loader_path)) {
+ $verb_case = ($server_type == SERVER_UNKNOWN)?"may":"will";
+ echo "<p>Please note that you $verb_case need your system administrator to do the following to upgrade. The web server will need to be restarted after the loader file is changed.</p>";
+ }
+ $restart_needed = false;
+ }
+ if (is_string($newer_version)) {
+ $version_str = "version $newer_version";
+ } else {
+ $version_str = "a newer version";
+ }
+ $loader_name = get_loader_name();
+ echo "<p>To upgrade from version $installed_version to $version_str of the ionCube Loader, please replace your existing loader file, $loader_name, with
+ the file of the same name from one of the following packages:</p>";
+ if (is_ms_windows()) {
+ $basename = windows_package_name();
+ } else {
+ list($basename,$multiple_os_versions) = unix_package_name();
+ }
+ echo make_archive_list($basename,array('zip','tar.gz'));
+ if ($restart_needed) {
+ echo "<p>Once you have replaced the loader file please restart your web server.</p>";
+ }
+ echo '</div>';
+ }
+}
+
function loader_not_installed()
{
$loader = get_loaderinfo();
@@ -2512,16 +2851,66 @@
{
$self = get_self();
$timeout = (isset($_SESSION['timing_out']) && $_SESSION['timing_out'])?1:0;
+ $hostprovider = (!empty($_SESSION['hostprovider']))?$_SESSION['hostprovider']:'';
+ $hosturl = (!empty($_SESSION['hosturl']))?$_SESSION['hosturl']:'';
$form = <<<EOT
<p>This Wizard will give you information on how to install the ionCube Loader.</p>
<p>Please select the type of web server that you have and then click Next.</p>
+ <script type=text/javascript>
+ function trim(s) {
+ return s.replace(/^\s+|\s+$/g,"");
+ }
+ function input_ok() {
+ var l = document.getElementById('local');
+ if (l.checked) {
+ return true;
+ }
+
+ var s = document.getElementById('shared');
+ var d = document.getElementById('dedi');
+
+ if (!s.checked && !d.checked) {
+ alert("Please select one of the server types.");
+ return false;
+ } else {
+ var hn = document.getElementById('hostprovider');
+ var hu = document.getElementById('hosturl');
+ var hostprovider = trim(hn.value);
+ var hosturl = trim(hu.value);
+
+ if (!hostprovider || !hosturl) {
+ alert("Please enter both a hosting provider name and their URL.");
+ return false;
+ }
+ if (hostprovider.length < 4) {
+ alert("The hosting provider name should be at least 4 characters in length.");
+ return false;
+ }
+ if (!hosturl.match(/[A-Za-z0-9-_]+\.[A-Za-z0-9-_%&\?\/.=]+/)) {
+ alert("The hosting provider URL is invalid.");
+ return false;
+ }
+ if (hosturl.length < 5) {
+ alert("The hosting provider URL should be at least 5 characters in length.");
+ return false;
+ }
+ }
+ return true;
+ }
+ </script>
<form method=GET action=$self>
<input type="hidden" name="page" value="default">
<input type="hidden" name="timeout" value="$timeout">
- <input type=radio id=shared name=stype value=s><label for=shared>Shared <small>(for example, server with FTP access only and no access to php.ini)</small></label><br>
- <input type=radio id=dedi name=stype value=d><label for=dedi>Dedicated or VPS <small>(server with full root ssh access)</small></label><br>
- <input type=radio id=local name=stype value=l><label for=local>Local install</label>
- <p><input type=submit value=Next></p>
+ <input type=radio id=shared name=stype value=s onclick="document.getElementById('hostinginfo').style.display = 'block';"><label for=shared>Shared <small>(for example, server with FTP access only and no access to php.ini)</small></label><br>
+ <input type=radio id=dedi name=stype value=d onclick="document.getElementById('hostinginfo').style.display = 'block';"><label for=dedi>Dedicated or VPS <small>(server with full root ssh access)</small></label><br>
+ <div id="hostinginfo" style="display: none">If you are on a shared or dedicated server, please give your hosting provider and their URL:
+ <table>
+ <tr><td><label for=hostprovider>Name of your hosting provider</label></td><td><input type=text id="hostprovider" name=hostprovider value="$hostprovider"></td></tr>
+ <tr><td><label for=hosturl>URL of your hosting provider</label></td><td><input type=text id="hosturl" name=hosturl value="$hosturl"></td></tr>
+ </table>
+ </div>
+ <input type=radio id=local name=stype value=l onclick="document.getElementById('hostinginfo').style.display = 'none';"><label for=local>Local install</label>
+ <p><input type=submit value=Next onclick="return (input_ok(this) && showOverlay());"></p>
</form>
EOT;
return $form;
@@ -2544,29 +2933,42 @@
$rtl_path = try_runtime_loading_if_applicable();
if (extension_loaded($ext_name)) {
- list($lv,$is_old) = ioncube_loader_version_information();
- echo '<p>The ionCube Loader version ' . $lv . ' is installed and encoded files should run successfully.</p>';
- if ($is_old) {
- echo '<p>Please note though that you have an old version of the ionCube Loader.';
- if (is_string($is_old)) {
- echo " The latest version is $is_old.";
- }
+ list($lv,$mv,$newer_version) = ioncube_loader_version_information();
+ echo '<div class="success">';
+ echo '<h4>Loader Installed Successfully</h4>';
+ echo '<p>The ionCube Loader version ' . $lv . ' <strong>is installed</strong> and encoded files should run successfully.';
+ if ($newer_version) {
+ echo ' Please note though that you have an old version of the ionCube Loader.</p>';
+ $is_legacy_loader = loader_major_version_instructions($mv);
+ echo '</div>';
+ loader_upgrade_instructions($lv,$newer_version);
+ } else {
echo '</p>';
+ $is_legacy_loader = loader_major_version_instructions($mv);
+ echo '</div>';
+ if ($is_legacy_loader) {
+ loader_upgrade_instructions($lv,true);
+ }
}
successful_install_end_instructions($rtl_path);
} else {
+ echo '<div class="failure">';
+ echo '<h4>Loader Not Installed</h4>';
echo '<p>The ionCube Loader is <b>not</b> currently installed successfully.</p>';
if (!is_null($rtl_path)) {
echo '<p>Runtime loading was attempted but has failed.</p>';
+ echo '</div>';
$rt_errors = runtime_loading_errors();
if (!empty($rt_errors)) {
list_loader_errors($rt_errors);
}
link_to_php_ini_instructions();
} else {
+ echo '</div>';
list_loader_errors();
}
}
+ send_stats('check');
footer(true);
}
@@ -2574,6 +2976,9 @@
function ini_loader_errors()
{
$errors = array();
+ if (SERVER_SHARED == find_server_type() && !own_php_ini_possible(true)) {
+ $errors[ERROR_INI_USER_CANNOT_CREATE] = "It appears that you are not be able to create your own ini files on your shared server. <br><strong>You will need to ask your server administrator to install the ionCube Loader for you.</strong>";
+ }
$loader_loc = find_loader();
if (is_string($loader_loc)) {
if (!shared_and_runtime_loading()) {
@@ -2584,9 +2989,9 @@
$errors[ERROR_INI_NOT_FOUND] = 'The PHP configuration file (' . $sys['PHP_INI'] .') cannot be found.';
}
}
- $errors = array_merge($errors,loader_compatibility_test($loader_loc));
+ $errors = $errors + loader_compatibility_test($loader_loc);
} else {
- $errors = $loader_loc;
+ $errors = $errors + $loader_loc;
}
return $errors;
}
@@ -2613,9 +3018,9 @@
$rel_path = '';
$rootpath = realpath($_SERVER['DOCUMENT_ROOT']);
for ($seps = 0; $seps < $depth; $seps++) {
- $full_ini_loc = realpath($startdir . '/' . $rel_path) . DIRECTORY_SEPARATOR . $ini_name;
+ $full_ini_loc = @realpath($startdir . '/' . $rel_path) . DIRECTORY_SEPARATOR . $ini_name;
if (@file_exists($full_ini_loc) && $sys['PHP_INI'] != $full_ini_loc) {
- $ini_list[] = realpath($full_ini_loc);
+ $ini_list[] = @realpath($full_ini_loc);
}
if (dirname($full_ini_loc) == $rootpath) {
@@ -2663,34 +3068,40 @@
$warnings = array();
if (find_server_type() == SERVER_SHARED)
{
- $sys = get_sysinfo();
- $ini_name = ini_file_name();
- $rootpath = realpath($_SERVER['DOCUMENT_ROOT']);
- $here = unix_path_dir();
- $ini_files = unrecognised_inis_webspace($here);
- foreach ($ini_files as $full_ini_loc) {
- $advice = "The file $full_ini_loc is not being recognised by PHP.";
- $advice .= " Please check that the name and location of the file are correct.";
- if (!ini_same_dir_as_wizard()) {
- $shared_ini_loc = shared_ini_location();
- $ini_dir = dirname($sys['PHP_INI']);
- $ini_loc_dir = dirname($full_ini_loc);
- $shared_ini_file = $shared_ini_loc . DIRECTORY_SEPARATOR . $ini_name;
- if (!@file_exists($shared_ini_file) && $ini_loc_dir != $shared_ini_loc && $ini_dir != $shared_ini_loc) {
- $advice .= " Please try copying the <code>$full_ini_loc</code> file to <code>" . $shared_ini_loc . "</code>.";
- } else {
- $root_ini_file = $rootpath . DIRECTORY_SEPARATOR . $ini_name;
- if (!@file_exists($root_ini_file) && $rootpath != $shared_ini_loc && $full_ini_loc != $rootpath) {
- $advice .= " Please try copying the <code>$full_ini_loc</code> file to <code>" . $rootpath . "</code>.";
- }
- $herepath = realpath($here);
- $here_ini_file = $herepath . DIRECTORY_SEPARATOR . $ini_name;
- if (!@file_exists($here_ini_file) && $herepath != $rootpath) {
- $advice .= " It may be necessary to copy the <code>$full_ini_loc</code> file to <code>$herepath</code> and to all " . (is_ms_windows()?'folders':'directories') . ' in which you have encoded files';
+ if (own_php_ini_possible()) {
+ $sys = get_sysinfo();
+ $ini_name = ini_file_name();
+ $rootpath = realpath($_SERVER['DOCUMENT_ROOT']);
+ $root_ini_file = $rootpath . DIRECTORY_SEPARATOR . $ini_name;
+ $here = unix_path_dir();
+ $ini_files = unrecognised_inis_webspace($here);
+ $shared_ini_loc = shared_ini_location();
+ $shared_ini_file = $shared_ini_loc . DIRECTORY_SEPARATOR . $ini_name;
+ $ini_dir = dirname($sys['PHP_INI']);
+ foreach ($ini_files as $full_ini_loc) {
+ $advice = "The file $full_ini_loc is not being recognised by PHP.";
+ $advice .= " Please check that the name and location of the file are correct.";
+ if (!ini_same_dir_as_wizard()) {
+ $ini_loc_dir = dirname($full_ini_loc);
+ if (!@file_exists($shared_ini_file) && !empty($shared_ini_loc) && $ini_loc_dir != $shared_ini_loc && $ini_dir != $shared_ini_loc) {
+ $advice .= " Please try copying the <code>$full_ini_loc</code> file to <code>" . $shared_ini_loc . "</code>.";
+ } else {
+ if (!@file_exists($root_ini_file) && $rootpath != $shared_ini_loc && $full_ini_loc != $rootpath) {
+ $advice .= " Please try copying the <code>$full_ini_loc</code> file to <code>" . $rootpath . "</code>.";
+ }
+ $herepath = realpath($here);
+ $here_ini_file = $herepath . DIRECTORY_SEPARATOR . $ini_name;
+ if (!@file_exists($here_ini_file) && $herepath != $rootpath) {
+ $advice .= " It may be necessary to copy the <code>$full_ini_loc</code> file to <code>$herepath</code> and to all " . (is_ms_windows()?'folders':'directories') . ' in which you have encoded files';
+ }
}
}
+ $warnings[] = $advice;
+ }
+ } else {
+ if (own_php_ini_possible(true)) {
+ $warnings[] = "You may not be able to create your own ini files on your shared server. <br><strong>You might need to ask your server administrator to install the ionCube Loader for you.</strong>";
}
- $warnings[] = $advice;
}
} else {
$loader_dir_pair = correct_loader_wrong_location();
@@ -2724,6 +3135,9 @@
echo 'The following problem has been found with the ionCube Loader installation:';
$retry_message = "Please correct that error and $try_again.";
}
+ if (array_key_exists(ERROR_INI_USER_CANNOT_CREATE,$errors)) {
+ $retry_message = '';
+ }
echo make_list($errors,"ul");
echo '</div>';
if (!empty($warnings)) {
@@ -2742,7 +3156,9 @@
echo "<p>Please contact your server administrator about installing the ionCube Loader.</p>";
} else {
if (selinux_is_enabled()) {
- echo "<p>It appears that SELinux is enabled on your server. Please follow the instructions at <a target=\"_blank\" href=\"http://www.cuteshift.com/57/install-ioncube-loader-while-selinux-enabled/\">http://www.cuteshift.com/57/install-ioncube-loader-while-selinux-enabled/</a> for installing the ionCube Loader when SELinux is enabled.</p>";
+ echo "<p>It appears that SELinux is enabled on your server. This might be solved by running the command <code>restorecon [full path to loader file]</code> as root. If that does not solve the problem then please follow the instructions at <a target=\"_blank\" href=\"http://www.cuteshift.com/57/install-ioncube-loader-while-selinux-enabled/\">http://www.cuteshift.com/57/install-ioncube-loader-while-selinux-enabled/</a> for installing the ionCube Loader when SELinux is enabled.</p>";
+ } elseif (grsecurity_is_enabled()) {
+ echo "<p>It appears that grsecurity is enabled on your server. Please run the command, <code>execstack -c [full path to loader file]</code> and then restart your web server.</p>";
} else {
$sysinfo = get_sysinfo();
$ss = $sysinfo['SS'];
@@ -2844,7 +3260,7 @@
$lines['Ini Loader version'] = $loader_system['loader_version'];
}
}
- $lines["OS extra security"] = (selinux_is_enabled() || possibly_selinux())?"SELinux":"None";
+ $lines["OS extra security"] = (selinux_is_enabled() || possibly_selinux())?"SELinux":(grsecurity_is_enabled()?"Grsecurity":"None");
$lines['PHPRC is'] = $sys['PHPRC'];
$lines['INI DIR is'] = $sys['PHP_INI_DIR'];
$lines['Additional INI files'] = $sys['PHP_INI_ADDITIONAL'];
@@ -2854,6 +3270,12 @@
$lines["PHP uname"] = $ldinf['uname'];
$lines['Server word size is'] = $ldinf['wordsize'];
$lines['Disabled functions'] = ini_get('disable_functions');
+ $writeable_dirs = writeable_directories();
+ $lines['Writeable loader locations'] = (empty($writeable_dirs))?"<em>None</em>":join(", ",$writeable_dirs);
+ if (!empty($_SESSION['hostprovider'])) {
+ $lines['Hosting provider'] = $_SESSION['hostprovider'];
+ $lines['Provider URL'] = $_SESSION['hosturl'];
+ }
foreach ($lines as $h => $i) {
$v = (empty($i))?'<em>EMPTY</em>':$i;
echo '<tr><th>'. $h . ':</th>' . '<td>' . $v . '</td></tr>';
@@ -2892,6 +3314,10 @@
} elseif (!empty($_SESSION['not_go_daddy'])) {
$_SESSION['godaddy_root'] = '';
}
+ if (!empty($_SESSION['godaddy_root'])) {
+ $_SESSION['hostprovider'] = 'GoDaddy';
+ $_SESSION['hosturl'] = 'www.godaddy.com';
+ }
return $_SESSION['godaddy_root'];
}
@@ -2934,18 +3360,20 @@
heading();
- $inst_str = '<h4>GoDaddy Installation Instructions</h4>';
- $inst_str .= '<p>It appears that you are hosted with GoDaddy (<a target="_blank" href="http://www.godaddy.com/">www.godaddy.com</a>). ';
- $inst_str .= "If that is <b>not</b> the case then please <a href=\"$base&page=default&host=ngd\">click here to go to the main page of this installation wizard</a>.</p>";
- $inst_str .= "<p>If you have already installed the loader then please <a href=\"$base&page=loader_check\">click here to test the loader</a>.</p>";
+ $inst_str = '<h4>GoDaddy Installation Instructions</h4>';
+ $inst_str .= '<p>It appears that you are hosted with GoDaddy (<a target="_blank" href="http://www.godaddy.com/">www.godaddy.com</a>). ';
+ $inst_str .= "If that is <b>not</b> the case then please <a href=\"$base&page=default&host=ngd\">click here to go to the main page of this installation wizard</a>.</p>";
+ $inst_str .= "<p>If you have already installed the loader then please <a href=\"$base&page=loader_check\" onclick=\"showOverlay();\">click here to test the loader</a>.</p>";
- echo $inst_str;
+ echo $inst_str;
- if (is_ms_windows()) {
- GoDaddy_windows_instructions();
- } else {
- GoDaddy_linux_instructions($_SESSION['godaddy_root']);
- }
+ if (is_ms_windows()) {
+ GoDaddy_windows_instructions();
+ } else {
+ GoDaddy_linux_instructions($_SESSION['godaddy_root']);
+ }
+
+ send_stats('gd_default');
footer(true);
}
@@ -3004,10 +3432,41 @@
die("<b>ERROR:</b> <span class=\"error\">$m</span><p>Please help us improve this script by <a href=\"". SUPPORT_SITE . "\">reporting this error</a> and including the URL to the script so that we can test it.");
}
+function failsafe_get_self()
+{
+ $result = '';
+ $sfn = $_SERVER['SCRIPT_FILENAME'];
+ $dr = $_SERVER['DOCUMENT_ROOT'];
+ if (!empty($sfn) && !empty($dr)) {
+ if ($dr == '/' || $dr == '\\') {
+ $result = $sfn;
+ } else {
+ $drpos = strpos($sfn,$dr);
+ if ($drpos === 0) {
+ $drlen = strlen($dr);
+ $result = substr($sfn,$drlen);
+ }
+ }
+ $result = str_replace('\\','/',$result);
+ }
+ if (empty($result)) {
+ $result = DEFAULT_SELF;
+ }
+ return $result;
+}
+
function get_self()
{
if (empty($_SERVER['PHP_SELF'])) {
- return @$_SERVER['SCRIPT_NAME'];
+ if (empty($_SERVER['SCRIPT_NAME'])) {
+ if (empty($_SERVER['REQUEST_URI'])) {
+ return failsafe_get_self();
+ } else {
+ return $_SERVER['REQUEST_URI'];
+ }
+ } else {
+ return $_SERVER['SCRIPT_NAME'];
+ }
} else {
return $_SERVER['PHP_SELF'];
}
@@ -3051,18 +3510,34 @@
$self = get_self();
echo <<<EOT
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN "http://www.w3.org/TR/html4/loose.dtd">
-<html>
-<head>
- <title>ionCube Loader Wizard</title>
- <link rel="stylesheet" type="text/css" href="$self?page=css">
-</head>
-<body>
-<div id=header>
- <img src="?page=logo" alt="ionCube logo">
-</div>
-<div id=main>
- <h2>ionCube Loader Wizard</h2>
+ <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN "http://www.w3.org/TR/html4/loose.dtd">
+ <html>
+ <head>
+ <title>ionCube Loader Wizard</title>
+ <link rel="stylesheet" type="text/css" href="$self?page=css">
+ <script type="text/javascript">
+ function showOverlay()
+ {
+ document.getElementById('overlay').style.display = 'block';
+ return true;
+ }
+
+ function hideOverlay()
+ {
+ document.getElementById('overlay').style.display = 'none';
+ return true;
+ }
+ </script>
+ </head>
+ <body onload="hideOverlay()">
+ <div id="overlay">
+ <div id="inner_overlay">Checking server configuration<br>Please wait</div>
+ </div>
+ <div id=header>
+ <img src="?page=logo" alt="ionCube logo">
+ </div>
+ <div id=main>
+<h2>ionCube Loader Wizard</h2>
EOT;
}
@@ -3071,7 +3546,7 @@
$self = get_self();
$base = get_base_address();
$default = get_default_address(false);
- $year = date("Y");
+ $year = gmdate("Y");
echo "</div>";
echo "<div id=\"footer\">" .
@@ -3157,8 +3632,8 @@
echo " | <a href=\"$base&page=extra&stype=$server_type_code\" target=\"extra\">additional</a>";
echo " | <a href=\"$base&page=system_info_archive&stype=$server_type_code\">info archive</a>";
}
- echo " | <a href=\"$default\">wizard start</a>";
- echo " | <a href=\"$base&page=loader_check\">loader test</a>";
+ echo " | <a href=\"$default\" onclick=\"showOverlay();\">wizard start</a>";
+ echo " | <a href=\"$base&page=loader_check\" onclick=\"showOverlay();\">loader test</a>";
echo ' | <a href="' . LOADERS_PAGE . '" target="loaders">loaders</a>';
echo "</div>\n";
@@ -3185,6 +3660,33 @@
LI {
margin-top: 10px;
}
+ #overlay {
+ display: block;
+ z-index: 100;
+ position: absolute;
+ top: 0;
+ left: 0;
+ padding: 0;
+ margin: 0;
+ width: 100%;
+ height: 100%;
+ background-color: white;
+ }
+ #inner_overlay {
+ display: block;
+ z-index: 100;
+ position: absolute;
+ font-size: 200%;
+ color: #660000;
+ top: 50%;
+ left: 25%;
+ width: 460px;
+ height: 460px;
+ line-height: 200%;
+ text-align: center;
+ vertical-align: middle;
+ }
+
#loading {
display: block;
position: absolute;
@@ -3244,6 +3746,24 @@
width: 75%;
}
+ #hostinginfo {
+ margin-top: 10px;
+ margin-left: 20px;
+ }
+ #hostinginfo table {
+ font-size: 1.00em;
+ }
+ #hostinginfo table td {
+ padding-right: 4px;
+ }
+ #hostinginfo input {
+ margin-top: 6px;
+ }
+
+ #hostinginfo label {
+ margin-left: 6px;
+ }
+
th {
text-align: left;
}
@@ -3257,7 +3777,6 @@
width: 75%;
}
-
.warning {
margin: 2ex 0;
border: 1px solid #FFBF00;
@@ -3266,6 +3785,15 @@
color: #000000;
width: 75%;
}
+
+ .success {
+ margin: 2ex 0;
+ border: 1px solid #006600;
+ padding: 1ex 1em;
+ background-color: #EEFFEE;
+ color: #000000;
+ width: 75%;
+ }
.error {
color: #FF0000;
|