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.
- %s is a development version, not ready for production.
- %s provides PHP version %s in its official repository
- Sorry, but PHP version %s is not available for %s, you need to run a more recent OS.
- 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:");
if ($ver < 6) {
printf("
wget https://dl.fedoraproject.org/pub/epel/epel-release-latest-%d.noarch.rpm\n", $ver); printf(" $yum install epel-release-latest-%d.noarch.rpm\n", $ver); printf("
- Command to install the Remi repository configuration package:");
printf("
wget http://rpms.remirepo.net/enterprise/remi-release-%d.rpm\n", $ver); printf(" $yum install http://rpms.remirepo.net/enterprise/remi-release-%d.rpm
", $ver); } else { 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
- You have to enable the repository by setting enabled=1 in the [%s] section of /etc/yum.repos.d/remi.repo", $phpvers[$php]); } else { printf("
- Command to enable the repository:");
if ($dist == 'Fedora') {
printf("
dnf config-manager --set-enabled %s
", $phpvers[$php]); } else { printf("yum-config-manager --enable %s
", $phpvers[$php]); } } 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
", $phpvers[$php]); 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
- The %s collection is available in the remi repository
- Command to install:");
printf("
$yum --enablerepo=remi install %s
", $scl); printf(" - Command to install additional packages:");
printf("
$yum --enablerepo=remi install %s-php-xxx
", $scl); } else { printf(" - The %s collection is available in the remi-safe repository
- Command to install:");
printf("
$yum install %s
", $scl); printf(" - Command to install additional packages:");
printf("
$yum 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 ($ver < 6 && version_compare($php, '7.0', '>=')) { printf("
", $php, $os); $err = true; } } 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 { printf("
", $php, $os, $phpvers[$php]); if ($ver < 6) { 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 ($dist=='Fedora') { printf("
", $scl); printf("
"); printf("
", $scl); printf("
"); printf("
"); printf("
"); printf("
"); $counter++; @file_put_contents(COUNTER, "$counter\n"); } } else if (!$os) { echo "