Operating system and version selection
Wizard answer
-
Debug: $os, $type, $php (%s)", print_r($_POST, true));
$err = false;
if ($os) {
list($dist, $ver) = explode(' ', $os, 2);
if (($dist == 'Fedora' && $ver<=FC_EOL) || ($dist != 'Fedora' && $ver<=EL_EOL)) {
printf("
- %s have reached its end of life, upgrade is strongly recommended.
- WARNING: %s is a development version, not ready for production.
- %s provides PHP version %s in its official repository
- WARNING, PHP version %s have reached its eod of life, despite packages have security fix, you should consider a maintained version.
- Command to install the Remi repository configuration package:");
printf("
$yum install http://rpms.remirepo.net/fedora/remi-release-%d.rpm
", $ver); printf(" - Command to install the EPEL repository configuration package:");
printf("
$yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-%d.noarch.rpm
", $ver); printf(" - Command to install the Remi repository configuration package:");
printf("
$yum install http://rpms.remirepo.net/enterprise/remi-release-%d.rpm
", $ver); printf(" - Command to install the yum-utils package (for the yum-config-manager command):");
printf("
$yum install yum-utils
"); printf(" - On RHEL you (probably) need to enable the optional channel for some dependencies.
- Command to enable:");
if ($ver == 7) {
printf("
subscription-manager repos --enable=rhel-7-server-optional-rpms
"); } else { printf("rhn-channel --add --channel=rhel-$(uname -i)-server-optional-6
"); } printf(" - You want a single version which means replacing base packages from the distribution
- Packages have the same name than the base repository, ie php-*
- Sorry, but PHP version %s are not yet available for %s as single version, try multiple versions.
- Sorry, but PHP version older than %s are not available for %s, try multiple versions.
- PHP version %s packages are available for %s in %s repository
- If the priorities plugin is enabled, ensure %s have higher priority (a lower value) than %s
- Command to enable the repository:");
if ($dist == 'Fedora') {
printf("
dnf config-manager --set-enabled %s
", $repo); } else { printf("yum-config-manager --enable %s
", $repo); } printf(" - Command to upgrade (the repository only provides PHP):");
printf("
$yum update
"); printf(" - Command to install additional packages:");
printf("
$yum install php-xxx
"); printf(" - Command to install testing packages:");
printf("
$yum --enablerepo=%s-test install php-xxx
", $repo); printf(" - Command to check the installed version and available extensions:");
printf("
php --version\n php --modules
"); printf(" - You want multiple versions which means using a Software Collection
- Sorry, but PHP version older than %s are not available for %s.
- WARNING: PHP version %s is a development version, not ready for production.
- The %s collection is available in the $repo repository
- Command to install:");
printf("
$yum --enablerepo=$repo install %s
", $scl); printf(" - Command to install additional packages:");
printf("
$yum --enablerepo=$repo install %s-php-xxx
", $scl); } else { $repo = ($phpvers[$php] ? 'remi-safe' : 'remi-test'); // Dev version $opt = ($phpvers[$php] ? '' : '--enablerepo=remi-test'); // Dev version printf(" - The %s collection is available in the $repo repository
- Command to install:");
printf("
$yum $opt install %s
", $scl); printf(" - Command to install additional packages:");
printf("
$yum $opt install %s-php-xxx
", $scl); } printf(" - Command to install testing packages:");
printf("
$yum --enablerepo=remi-test install %s-php-xxx
", $scl); printf(" - Command to check the installed version and available extensions:");
printf("
%s --version\n %s --modules
", $scl, $scl); printf(" Please select the operating system you are running.
";
} else if (!$php) {
echo "Please select PHP version you want to use.
";
} else if (!$err) {
echo "Please select installation type
";
}
?>
", $os); } if (($dist == 'Fedora' && $ver>=FC_DEV) || ($dist != 'Fedora' && $ver>=EL_DEV)) { printf("
", $os); } } if ($php && $os) { printf("
", $os, $osvers[$os]); if (version_compare($php, '5.6', '<')) { printf("
", $php); } } if ($php && $os && $type && !$err) { if ($dist == 'Fedora') { $yum = 'dnf'; printf("
"); } else { $yum = 'yum'; printf("
"); printf("
"); if ($dist == 'RHEL') { printf("
"); printf("
"); } } if ($type == 'base') { printf("
"); printf("
"); if (!$phpvers[$php]) { printf("
", $php, $os); } else if (version_compare($php, $osvers[$os], '<')) { printf("
", $osvers[$os], $os); } else { if ($dist == 'Fedora' && version_compare($php, $osvers[$os], '=')) { $repo = 'remi'; } else { $repo = $phpvers[$php]; } printf("
", $php, $os, $repo); printf("
", $repo, ($dist == 'Fedora' ? 'fedora' : 'base and updates')); printf("
"); printf("
"); printf("
"); if (version_compare($php, '7.0', '>=')) { printf("
"); } printf("
"); } $counter++; @file_put_contents(COUNTER, "$counter\n"); } else { printf("
"); $scl='php'.str_replace('.', '', $php); if (version_compare($php, $osmin[$os], '<')) { printf("
", $osmin[$os], $os); } else { if (!$phpvers[$php]) { printf("
", $php); } if ($dist=='Fedora') { $repo = ($phpvers[$php] ? 'remi' : 'remi-test'); // Dev version printf("
", $scl); printf("
"); printf("
", $scl); printf("
"); printf("
"); if ($phpvers[$php]) { printf("
"); } printf("
"); } $counter++; @file_put_contents(COUNTER, "$counter\n"); } } else if (!$os) { echo "