function correct_loader_wrong_location()
{
    $loader_location_pair = array();
    $loader_location = find_loader_filesystem();
    if (is_string($loader_location)) {
        $loader_errors = loader_compatibility_test($loader_location);
        if (empty($loader_errors)) {
            $ini_loader = scan_inis_for_loader();
            if (!empty($ini_loader['location'])) {
                $ini_loader_errors = loader_compatibility_test($ini_loader['location']);
                if (!empty($ini_loader_errors)) {
                    $loader_location_pair['loader'] = $loader_location;
                    $loader_location_pair['newloc'] = dirname($ini_loader['location']);
                }
            } else {
                $std_dir = loader_install_dir(find_server_type());
                $std_ld_path = $std_dir . DIRECTORY_SEPARATOR . get_loader_name();
                if (@file_exists($std_ld_path)) {
                    $stdloc_loader_errors = loader_compatibility_test($std_ld_path);
                } else {
                    $stdloc_loader_errors = array("Loader file does not exist.");
                }
                if (!empty($stdloc_loader_errors)) {
                    $loader_location_pair['loader'] = $loader_location;
                    $loader_location_pair['newloc'] = $std_dir;
                }
            }
        }
    }
    return $loader_location_pair;
}
Exemple #2
0
function list_loader_errors()
{
    $errors = array();
    $loader_loc = find_loader();
    $self = get_self();
    if (is_string($loader_loc)) {
        $errors = loader_compatibility_test($loader_loc);
    } else {
        $errors = $loader_loc;
    }
    if (!empty($errors)) {
        $try_again = '<a href="#" onClick="window.location.href=window.location.href">try again</a>';
        if (count($errors) > 1) {
            $retry_message = "Please correct those errors and {$try_again}.";
            echo 'The following problems have been found with the Loader installation:';
        } else {
            $retry_message = "Please correct that error and {$try_again}.";
            echo 'The following problem has been found with the Loader installation:';
        }
        echo make_list($errors, "ul");
        echo $retry_message;
    }
    echo " You may wish to view the following for further help:";
    echo make_list(help_resources($errors), "ul");
    echo '<a href="' . $self . '">Click here to go back to the start of the Loader Wizard</a>.<br>';
}
Exemple #3
0
function ini_loader_errors()
{
    $errors = array();
    $loader_loc = find_loader(); 
    if (is_string($loader_loc)) {
        if (!shared_and_runtime_loading()) {
            $sys = get_sysinfo();
            if (empty($sys['PHP_INI'])) {
                $errors[ERROR_INI_NO_PATH] = 'No file path found for the PHP configuration file (php.ini).';
            } elseif (!file_exists($sys['PHP_INI'])) {
                $errors[ERROR_INI_NOT_FOUND] = 'The PHP configuration file (' . $sys['PHP_INI'] .') cannot be found.';
            }
        }
        $errors = array_merge($errors,loader_compatibility_test($loader_loc));
    } else {
        $errors = $loader_loc;
    } 
    return $errors;
}