summaryrefslogtreecommitdiffstats
path: root/wizard/index.php
blob: c77e706649cea7ad5e97aa67c6506930f4fb32f1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<meta content="text/html; charset=utf-8" http-equiv="content-type" />
		<title>Remi's RPM repository</title>
		<link href="../enterprise/7/remi/x86_64/repoview/layout/repostyle.css" type="text/css" rel="stylesheet" />
		<meta content="index,follow" name="robots" />
		<link rel="shortcut icon" href="/favicon.ico" />
</head>
<?php
define('FC_EOL', 38);
define('FC_DEV', 41);
define('EL_EOL', 7);
define('EL_DEV', 10);
define('PHP_SEC', '8.1');
define('EPEL_DEV', 2); // 0 missing, 1 partially populated, 2 mostly full
define('COUNTER', __DIR__ . "/counter.txt");

$osvers = [
    'RHEL 9'    => ['8.0', '8.1', '8.2'],
    'RHEL 8'    => ['7.4', '8.0', '8.2'],
//  'RHEL 7'    => '5.4',
    'CentOS 9'  => ['8.0', '8.1', '8.2'],
//  'CentOS 8'  => ['7.4', '8.0', '8.2'],
//  'CentOS 7'  => '5.4',
    'EL 9'      => ['8.0', '8.1', '8.2'],
    'EL 8'      => ['7.4', '8.0', '8.2'],
//  'EL 7'      => '5.4',
    'Fedora 40' => '8.3',
    'Fedora 39' => '8.2',
    'Fedora 38' => '8.2',
];
$osmin = [
    'RHEL 9'    => '7.4',
    'RHEL 8'    => '5.6',
//  'RHEL 7'    => '5.4',
    'CentOS 9'  => '7.4',
//  'CentOS 8'  => '5.6',
//  'CentOS 7'  => '5.4',
    'EL 9'      => '7.4',
    'EL 8'      => '5.6',
//   'EL 7'      => '5.4',
    'Fedora 40' => '7.4',
    'Fedora 39' => '7.4',
    'Fedora 38' => '7.4',
];
$osminbase = [
    'RHEL 9'    => '7.4',
    'RHEL 8'    => '7.2',
//  'RHEL 7'    => '5.4',
    'CentOS 9'  => '7.4',
//  'CentOS 8'  => '7.2',
//  'CentOS 7'  => '5.4',
    'EL 9'      => '7.4',
    'EL 8'      => '7.2',
//  'EL 7'      => '5.4',
    'Fedora 40' => '7.4',
    'Fedora 39' => '7.4',
    'Fedora 38' => '7.4',
];
$osmax = [
    'RHEL 9'    => '8.4',
    'RHEL 8'    => '8.4',
//  'RHEL 7'    => '8.3',
    'CentOS 9'  => '8.4',
//  'CentOS 8'  => '8.3',
//  'CentOS 7'  => '8.3',
    'EL 9'      => '8.4',
    'EL 8'      => '8.4',
//  'EL 7'      => '8.3',
    'Fedora 40' => '8.4',
    'Fedora 39' => '8.4',
    'Fedora 38' => '8.4',
];
$osname = [
	':rhel'     	=> 'Red Hat Enterprise Linux',
		'RHEL 9'    => 'RHEL 9.4', //  (maintained until May 31, 2032)
		'RHEL 8'    => 'RHEL 8.9', //  (maintained until May 31, 2029)
//		'RHEL 7'    => 'RHEL 7.9 (maintained until June 30, 2024)',
	':centos'		=> 'CentOS Stream, CentOS Linux',
		'CentOS 9'  => 'CentOS Stream 9', //  (maintained until May 31, 2027)
//		'CentOS 8'  => 'CentOS Stream 8 (maintained until May 31, 2024)',
//		'CentOS 7'  => 'CentOS 7 (maintained until June 30, 2024)',
	':clone'		=> 'Alma Linux, Rocky Linux and other clones',
		'EL 9'      => 'EL 9',
		'EL 8'      => 'EL 8',
//		'EL 7'      => 'EL 7 (maintained until June 30, 2024)',
	':fedora'		=> 'Fedora Linux',
		'Fedora 40' => 'Fedora 40',
		'Fedora 39' => 'Fedora 39',
		'Fedora 38' => 'Fedora 38 (End of Life since May 21, 2024)',
];
$types = [
    'base' => 'Default / Single version (simplest way)',
    'scl'  => 'Multiple versions simultaneously',
];
$arches = [
	'x86_64'  => 'x86_64',
	'aarch64' => 'aarch64',
	'ppc64le' => 'ppc64le',
	's390x'   => 's390x',
];
$phpvers = [
	// use false when only SCL
	'8.4' => false,
	'8.3' => 'remi-php83',
	'8.2' => 'remi-php82',
	'8.1' => 'remi-php81',
	'8.0' => 'remi-php80',
    '7.4' => 'remi-php74',
    '7.3' => 'remi-php73',
    '7.2' => 'remi-php72',
    '7.1' => 'remi-php71',
    '7.0' => 'remi-php70',
    '5.6' => 'remi-php56',
    '5.5' => 'remi-php55',
    '5.4' => 'remi-php54',
];
$phpname = [
	':devel'  => 'Development version, not ready for production',
		'8.4' => '8.4.0alpha1',
	':stable' => 'Stable versions - usage recommended',
		'8.3' => '8.3.9  (active support until December 2025)',
		'8.2' => '8.2.21 (active support until December 2024)',
	':secure' => 'Security only versions',
		'8.1' => '8.1.29 (security only support until December 2025)',
	':eol'    => 'Deprecated versions - usage discouraged',
		'8.0' => '8.0.30 (no upstream support since November 2023)',
		'7.4' => '7.4.33 (no upstream support since November 2022)',
		'7.3' => '7.3.33 (no upstream support since December 2021)',
		'7.2' => '7.2.34 (no upstream support since November 2020)',
		'7.1' => '7.1.33 (no upstream support since December 2019)',
		'7.0' => '7.0.33 (no upstream support since December 2018)',
		'5.6' => '5.6.40 (no upstream support since January 2019)',
//		'5.5' => '5.5.38 (no upstream support since July 2016)',
//		'5.4' => '5.4.45 (no upstream support since September 2015)',
];
$php  = (isset($_POST['php'])  && isset($phpvers[$_POST['php']]) ? $_POST['php'] : false);
$os   = (isset($_POST['os'])   && isset($osvers[$_POST['os']])   ? $_POST['os'] : false);
$type = (isset($_POST['type']) && isset($types[$_POST['type']])  ? $_POST['type'] : false);
$arch = (isset($_POST['arch']) && isset($arches[$_POST['arch']])  ? $_POST['arch'] : 'x86_64');

?>
<body>
	<div id="page">
		<div id="top">
			<h1><span><a href="/">Remi's RPM repository - Configuration wizard</a></span></h1>
		</div>
		<p id="prelude">
			<a href="https://blog.remirepo.net/">Blog</a> |
			<a href="https://github.com/remicollet/remirepo/issues">Support</a> |
			<a href="https://rpms.remirepo.net/">Repository</a> |
			<a href="https://rpms.remirepo.net/wizard/">Wizard</a>
		</p>
		<div id="wrapper">
			<div id="main">
				<div id="content">
<?php
									if (count($_POST) == 0) {
										echo '<h2>Please STOP WAR NOW!</h2><p><a href="https://blog.remirepo.net/post/2022/03/03/Please-STOP-war">';
										echo '<img alt="" class="media" src="https://blog.remirepo.net/public/icons/dove.svg" width="256" /></a></p>';
									}
?>
                                    <h2>Operating system and version selection</h2>
                                    <form method='post'>
                                    <ul class="pkglist">
                                    <li><p>Operating system:
                                        <select name='os' onChange='submit()'>
                                        <option value=''>--</option>
<?php
                                        $prev = false;
                                        foreach($osname as $osver => $name) {
                                            if ($osver[0] == ':') {
                                                if ($prev) echo "</optgroup>";
                                                printf("<optgroup label='%s'>", $name);
												$prev = true;
                                            } else {
	                                            printf("<option value='%s' %s>&nbsp;&nbsp;&nbsp;&nbsp;%s</option>", $osver, ($osver===$os ? 'selected' : ''), $name);
											}
                                        }
?>
                                        </optgroup></select>
                                    </p></li>
                                    <li><p>Wanted PHP version:
                                        <select name='php' onChange='submit()'>
                                        <option value=''>--</option>
<?php
                                        foreach($phpname as $phpver => $name) {
											if (is_numeric($phpver)) {
												printf("<option value='%s' %s>%s</option>", $phpver, ($phpver===$php ? 'selected' : ''), $name);
											} else {
                                                printf("<optgroup label='%s'>", $name);
											}
										}
?>
                                        </select>
                                    </p></li>
                                    <li><p>Type of installation:
                                        <select name='type' onChange='submit()'>
                                        <option value=''>--</option>
<?php
                                        foreach($types as $typeref => $name) printf("<option value='%s' %s>%s</option>", $typeref, ($typeref===$type ? 'selected' : ''), $name);
?>
                                        </select>
                                    </p></li>
                                    <li><p>Architecture:
                                        <select name='arch' onChange='submit()'>
<?php
                                        foreach($arches as $archref => $name) printf("<option value='%s' %s>%s</option>", $archref, ($archref===$arch ? 'selected' : ''), $name);
?>
                                        </select>
                                    </p></li>
                                    </ul>
                                    </form>
                                    <h2>Wizard answer</h2>
                                    <ul class="pkglist">
<?php
$counter = intval(@file_get_contents(COUNTER));

//printf("<p>Debug: $os, $type, $php (%s)</p>", 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("<li><img src='alarm.png'> <b>%s</b> has reached its <b>end of life</b>, upgrade is strongly recommended.</li><br />", $os);

    } else if (($dist == 'Fedora' && $ver>=FC_DEV) || ($dist != 'Fedora' && $ver>=EL_DEV)) {
        printf("<li><img src='notice.png'> <b>WARNING: %s</b> is a <b>development</b> version, not ready for production.</li><br />", $os);

    } else if ($ver == 7 || $ver == 38 || ($dist=="CentOS" && $ver == 8)) {
		if ($ver == 38)     $days = mktime(0, 0, 0, 5, 21, 2024);
		else if ($ver == 9) $days = mktime(0, 0, 0, 5, 31, $dist=="CentOS" ? 2027 : 2032);
		else if ($ver == 8) $days = mktime(0, 0, 0, 5, 31, $dist=="CentOS" ? 2024 : 2029);
		else if ($ver == 7) $days = mktime(0, 0, 0, 6, 30, 2024);
		$eol  = date("F Y", $days);
        $days = (int)(($days - time()) / (60 * 60 * 24));
		$weeks = round($days/7);
		$months = round($days/30);
		if ($months >= 6) {
	        printf("<li><img src='notice.png'> <b>WARNING: %s</b> will reach its <b>end of life</b> in $eol, in <b>$months months</b>, upgrade is heartily recommended.</li><br />", $os);
		} else if ($weeks >= 8) {
	        printf("<li><img src='alarm.png'> <b>WARNING: %s</b> will reach its <b>end of life</b> in $eol, in <b>$weeks weeks</b>, upgrade is strongly recommended.</li><br />", $os);
		} else {
	        printf("<li><img src='alarm.png'> <b>WARNING: %s</b> will reach its <b>end of life</b> in $eol, in <b>$days days</b>, upgrade is urgently recommended.</li><br />", $os);
		}
    }
}
if ($php && $os) {
    printf("<li><b>%s</b> provides PHP version <b>%s</b> in its official repository</li><br />",
		$os,
		is_array($osvers[$os]) ? implode(', ', $osvers[$os]) : $osvers[$os]
	);
    if (version_compare($php, PHP_SEC, '<')) {
        printf("<li><img src='notice.png'> <b>WARNING</b>, PHP version <b>%s</b> have reached its end of life, despite packages have security fixes, you should consider a maintained version.</li><br />", $php);
    }
    // else printf("<li>PHP %s is a maintained version (> %s).</li><br />", $php, PHP_SEC);
}

if ($arch == 'ppc64le' || $arch == 's390x') {
    printf("<li><b>$arch</b> is not planed for now</li><br />");
	$err =true;

} else if ($arch == 'aarch64') {
	if ($os && $dist === 'Fedora') {
		if ($ver < 39) {
		    printf("<li><b>aarch64</b> for Fedora $ver is not planed for now</li><br />");
			$err =true;
		}
	} else if ($os && $ver < 8) {
	    printf("<li><b>aarch64</b> for Enterprise Linux $ver is not planed for now</li><br />");
		$err =true;
	} else if ($os && $ver == 8) {
		// no older SCLs
		$osmin['RHEL 8'] = $osmin['CentOS 8'] = '7.2';
	}
}

if ($php && $os && $type && !$err) {
    if ($dist == 'Fedora') {
		$mod = ($ver >= 29);
        $yum = 'dnf';
        printf("<li>Command to install the Remi repository configuration package:");
        printf("<pre>    $yum install https://rpms.remirepo.net/fedora/remi-release-%d.rpm</pre>", $ver);
        printf("</li><br />");
    
    } else {
		$mod = ($ver >= 8);
		if ($ver >= 8) {
	        $yum = 'dnf';
		} else {
	        $yum = 'yum';
		}
		switch ($os) {
			case 'RHEL 8':
			case 'RHEL 9':
				printf("<li>Command to enabled the <b>CRB</b> repository:");
				printf("<pre>    subscription-manager repos --enable codeready-builder-for-rhel-%d-%s-rpms</pre></li><br />", $ver, $arch);
				break;
			case 'CentOS 8':
			case 'CentOS 9':
				printf("<li>Command to enabled the <b>CRB</b> repository:");
				printf("<pre>    dnf config-manager --set-enabled %s</pre></li><br />", $ver < 9 ? 'powertools' : 'crb');
				break;
		}
		if ($ver < EL_DEV || EPEL_DEV > 0) {
		    printf("<li>Command to install the <b>EPEL</b> repository configuration package:");
		    printf("<pre>    $yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-%d.noarch.rpm</pre></li><br />", $ver);
		}
        printf("<li>Command to install the <b>Remi</b> repository configuration package:");
        printf("<pre>    $yum install https://rpms.remirepo.net/enterprise/remi-release-%d.rpm</pre>", $ver);
        printf("</li><br />");

		if ($yum === "yum") {
	        printf("<li>Command to install the yum-utils package (for the yum-config-manager command):");
    	    printf("<pre>    $yum install yum-utils</pre>");
		}

		if ($ver == EL_DEV && EPEL_DEV < 2) {
		    printf("<li>As EPEL is not yet fully populated, you probably have to enable the main repository:");
		    printf("<pre>    dnf config-manager --enable remi</pre></li><br />", $ver);
		}

        printf("</li><br />");
        if ($dist == 'RHEL' && $ver < 8) {
            printf("<li>On <b>RHEL</b> you (probably) need to enable the <b>optional channel</b> for some dependencies.</li><br />");
            printf("</li><li>Command to enable:");
            if ($ver == 7) {
                printf("<pre>    subscription-manager repos --enable=rhel-7-server-optional-rpms</pre>");
            } else {
                printf("<pre>    rhn-channel --add --channel=rhel-$(uname -i)-server-optional-6</pre>");
            }
            printf("</li><br />");
        }
    }
    if ($type == 'base') {
        printf("<li>You want a <b>single version </b> which means replacing base packages from the distribution</li><br />");

		$min = $osminbase[$os];

        printf("<li>Packages have the <b>same name</b> than the base repository, ie php-*</li><br />");

        if (version_compare($php, $osmax[$os], '>')) {
            printf("<li>Sorry, but PHP version greater than <b>%s</b> are not available for <b>%s</b>.</li><br />", $osmax[$os], $os);

        } else if (!$phpvers[$php]) {
            printf("<li>Sorry, but PHP version <b>%s</b> are not yet available for <b>%s</b> as single version, try multiple versions.</li><br />", $php, $os);

        } else if (version_compare($php, $min, '<')) {
            printf("<li>Sorry, but PHP version older than <b>%s</b> are not available for <b>%s</b>, try multiple versions.</li><br />", $min, $os);

        } else {
            if ($dist == 'Fedora' && version_compare($php, $tmp=(is_array($osvers[$os]) ? $osvers[$os][0] : $osvers[$os]), '=')) {
                $repo = 'remi';
            } else {
                $repo = $phpvers[$php];
            }
            if ($dist != 'Fedora') {
                printf("<li>Some common <b>dependencies</b> are available in <b>remi-safe</b> repository, which is enabled by default</li><br />");
            } else if ($repo != 'remi') {
                printf("<li>Some common <b>dependencies</b> are available in <b>remi</b> repository, which need to be enabled");
                printf("<pre>    dnf config-manager --set-enabled remi</pre></li><br />");
            }

            if ($mod) {
                printf("<li>PHP version <b>%s</b> packages are available for <b>%s</b> in <b>remi-modular</b> repository</li><br />", $php, $os);

                printf("<li>You have to enable the module stream for $php, and update the old version if installed:");
                printf("<pre>    dnf module switch-to php:remi-%s</pre>", $php);
                printf("</li><br />");

		        printf("<li>If no version is installed, command to <b>install</b> the php stream default profile:");
                printf("<pre>    dnf module install php:remi-%s</pre>", $php);
		        printf("</li><br />");
            } else {
                printf("<li>PHP version <b>%s</b> packages are available for <b>%s</b> in <b>%s</b> repository</li><br />", $php, $os, $repo);
	            printf("<li>Command to enable the repository:");

                printf("<pre>    yum-config-manager --disable 'remi-php*'");
                printf(   "\n    yum-config-manager --enable   %s</pre></li><br />", $repo);

                printf("<li>You can check the list of the enabled repositories:");
                printf("<pre>    yum repolist</pre></li><br />");
                printf("<li>If the <b>priorities</b> plugin is enabled, ensure %s have higher priority (a lower value) than %s</li><br />", $repo, ($dist == 'Fedora' ? 'fedora' : 'base and updates'));

		        printf("<li>If an old version is installed, command to <b>upgrade</b>:");
		        printf("<pre>    $yum update</pre>");
		        printf("</li><br />");

		        printf("<li>If no version is installed, command to <b>install</b> the php command:");
		        printf("<pre>    $yum install php-cli</pre>");
		        printf("</li><br />");
			}
            printf("<li>Command to install <b>additional</b> packages (xxx for SAPI or extension name):");
            printf("<pre>    $yum install php-xxx</pre>");
            printf("</li><br />");

            if (version_compare($php, '7.0', '>=')) {
                printf("<li>Command to install <b>testing</b> packages:");
                if ($dist != 'Fedora' && $mod) {
                   printf("<pre>    $yum --enablerepo=remi-modular-test install php-xxx</pre>", $repo);
                } else {
                   printf("<pre>    $yum --enablerepo=%s-test install php-xxx</pre>", $repo);
                }
                printf("</li><br />");
            }

            printf("<li>Command to check the installed version and available extensions:");
            printf("<pre>    php --version\n    php --modules</pre>");
            printf("</li><br />");
        }
        $counter++;
        @file_put_contents(COUNTER, "$counter\n");

    } else {
        printf("<li>You want <b>multiple versions </b> which means using a <a href='https://www.softwarecollections.org/en/'>Software Collection</a></li><br />");
        $scl='php'.str_replace('.', '', $php);

		echo "<li><p><img src='info.png'> <b>Tips</b>: For Software Collection usage read: ";
		echo "<a href='https://blog.remirepo.net/post/2022/02/17/My-PHP-Workstation'>My PHP Workstation</a></p><br /></li>";
        
        if (version_compare($php, $osmax[$os], '>')) {
            printf("<li>Sorry, but PHP version greater than <b>%s</b> are not available for <b>%s</b> (%s).</li><br />", $osmax[$os], $os, $arch);
        } else if (version_compare($php, $osmin[$os], '<')) {
            printf("<li>Sorry, but PHP version older than <b>%s</b> are not available for <b>%s</b> (%s).</li><br />", $osmin[$os], $os, $arch);
        } else {
            if (!$phpvers[$php]) {
                printf("<li><img src='alarm.png'> <b>WARNING</b>: PHP version <b>%s</b> is a <b>development</b> version, not ready for production.</li><br />", $php);
            }
            if ($dist=='Fedora') {
                $repo = 'remi'; //($phpvers[$php] ? 'remi' : 'remi-test'); // Dev version

                printf("<li>Some common <b>dependencies</b> are available in <b>remi</b> repository, which need to be enabled");
                printf("<pre>    dnf config-manager --set-enabled remi</pre></li><br />");
                printf("<li>The <b>%s</b> collection is available in the <b>$repo</b> repository</li><br />", $scl);
                printf("<li>Command to install:");
                printf("<pre>    $yum install %s</pre>", $scl);
                printf("</li><br />");
                printf("<li>Command to install additional packages:");
                printf("<pre>    $yum install %s-php-xxx</pre>", $scl);
            } else {
                $repo = 'remi-safe'; //($phpvers[$php] ? 'remi-safe' : 'remi-test'); // Dev version
                $opt  = ""; //($phpvers[$php] ? '' : '--enablerepo=remi-test'); // Dev version

                printf("<li>The <b>%s</b> collection is available in the <b>$repo</b> repository</li><br />", $scl);
                printf("<li>Command to install:");
                printf("<pre>    $yum $opt install %s</pre>", $scl);
                printf("</li><br />");
                printf("<li>Command to install <b>additional</b> packages:");
                printf("<pre>    $yum $opt install %s-php-xxx</pre>", $scl);
            }
            printf("</li><br />");
            if ($phpvers[$php]) {
                printf("<li>Command to install <b>testing</b> packages:");
                printf("<pre>    $yum --enablerepo=remi-test install %s-php-xxx</pre>", $scl);
                printf("</li><br />");
            }

            printf("<li>Command to check the installed version and available extensions:");
            printf("<pre>    %s --version\n    %s --modules</pre>", $scl, $scl);
            printf("</li><br />");

            printf("<li>When a single version is installed, command in default path (/usr/bin/php) can be installed:");
            printf("<pre>    $yum install %s-syspaths</pre>", $scl);
            printf("</li><br />");
        }
        $counter++;
        @file_put_contents(COUNTER, "$counter\n");
    }
} else if (!$os) {
	echo "<li><p><img src='question.png'> Please select the operating system you are running.</p></li>";
	echo "<li><p><img src='info.png'> <b>Tips</b>: check the content of /etc/redhat-release.</p></li>";

} else if (!$php) {
	echo "<li><p><img src='question.png'> Please select PHP version you want to use.</p></li>";
	echo "<li><p><img src='info.png'> <b>Tips</b>: read: <a href='https://www.php.net/supported-versions.php'>PHP Supported Versions</a></li>";

} else if (!$err) {
	echo "<li><p><img src='question.png'> Please select installation type</p></li>";
	echo "<li><p><img src='info.png'> <b>Tips</b>: read the <a href='https://blog.remirepo.net/pages/English-FAQ#scl'>FAQ</a></p></li>";
}
?>
                                    </ul>
                                </div>
			</div>
			<div id="sidebar">
				<h2>Useful links</h2>
				<ul class="levbarlist">
					<li><a href="https://blog.remirepo.net/pages/Config-en" class="nlink" title="Repository configuration">Repository configuration</a></li>
					<li><a href="https://blog.remirepo.net/pages/English-FAQ"  class="nlink" title="F.A.Q.">F.A.Q.</a></li>
					<li><a href="https://github.com/remicollet/remirepo/issues"  class="nlink" title="Bug tracker">Bug tracker</a></li>
					<li><a href="https://blog.remirepo.net/post/2021/05/20/remirepo-IRC-channel-on-Libera-network"  class="nlink" title="IRC channel">IRC channel</a></li>
					<li><a href='https://twitter.com/RemiRepository'>Repository twitter account</a></li>
					<li><a href='https://discord.gg/qwC6kM2dcE'>Discord server</a></li>
					<li><?php
					$day  = (time() - mktime(0,0,0,12,8,2015)) / 86400;
					$rate = $counter / $day;
					printf("<b>%d answers</b> given since Dec 2015<br><b>%d answers</b> per day", $counter, $rate);
					?></li>
				</ul><br /><br /><br />
<form action="https://www.paypal.com/cgi-bin/webscr" method="post"><div>
<input type="hidden" name="cmd" value="_s-xcl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EJARYNcmVAcGF5cGFsLmNvbQIBADAJBgUrDgMCGgUAoF0wGAYJKoZIhvcNAQkDMQsGCSqGSIb3DQEHATAcBgkqhkiG9w0BCQUxDxcNMTAwNjA0MDU1NTEwWjAjBgkqhkiG9w0BCQQxFgQUo6DkEDxwjY+LFKOw0Vcxh7zRkPYwDQYJKoZIhvcNAQEBBQAEgYCzm9l6X7egJAMom1ZVdV1MqM30cxNGrQeQNQhgj8NnNs4N8uJ+sGeEXDlLdkkUJS4mUlAG6JwvOcCGr++NJUF+qmpQmX7YzbjBnt3pnWfcCrtYVkgCg/d0M+0ZEWTQEP3aMqIL/zeg70LYhg4/kgfR2jrN2IwxkChLoiZi6bQulQ==-----END PKCS7-----
" />
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_donate_LG.gif" name="submit" alt="PayPal - The safer, easier way to pay online!" />
<img alt="" src="https://www.paypal.com/fr_FR/i/scr/pixel.gif" width="1" height="1" />
</div></form>

			</div>
		</div>
	        <hr style="clear:both;"/>
	        
	</div>
</body>
</html>