Add support to UOPZ
uopz disables exit() by default, so we can't assume that exit() will actually quit a PHP scriptpull/29/head
parent
21f8edbea2
commit
25a58a500f
|
@ -49,6 +49,7 @@ sysvsem 5.6 7.0 7.1 7.2 7.3
|
|||
sysvshm 5.6 7.0 7.1 7.2 7.3
|
||||
tidy 5.6 7.0 7.1 7.2 7.3
|
||||
timezonedb 5.6 7.0 7.1 7.2 7.3
|
||||
uopz 5.6 7.0 7.1 7.2 7.3
|
||||
uuid 5.6 7.0 7.1 7.2 7.3
|
||||
wddx 5.6 7.0 7.1 7.2 7.3
|
||||
xdebug 5.6 7.0 7.1 7.2 7.3
|
||||
|
|
|
@ -493,6 +493,15 @@ installPECLModule () {
|
|||
installPECLModule_actual="${2}-2.5.5"
|
||||
fi
|
||||
;;
|
||||
uopz)
|
||||
if test $1 -lt 700
|
||||
then
|
||||
installPECLModule_actual="${2}-2.0.7"
|
||||
elif test $1 -lt 701
|
||||
then
|
||||
installPECLModule_actual="${2}-5.0.2"
|
||||
fi
|
||||
;;
|
||||
yaml)
|
||||
if test $1 -lt 700
|
||||
then
|
||||
|
|
|
@ -1,22 +1,24 @@
|
|||
<?php
|
||||
|
||||
$extension = isset($argv[1]) ? trim($argv[1]) : '';
|
||||
$rc = 1;
|
||||
|
||||
if ($extension === '') {
|
||||
fprintf(STDERR, "Missing module handle.\n");
|
||||
exit(1);
|
||||
}
|
||||
$nameMap = array(
|
||||
'opcache' => 'Zend OPcache',
|
||||
);
|
||||
$extensionLowerCase = strtolower($extension);
|
||||
if (isset($nameMap[$extensionLowerCase])) {
|
||||
$extension = $nameMap[$extensionLowerCase];
|
||||
} else {
|
||||
$nameMap = array(
|
||||
'opcache' => 'Zend OPcache',
|
||||
);
|
||||
$extensionLowerCase = strtolower($extension);
|
||||
if (isset($nameMap[$extensionLowerCase])) {
|
||||
$extension = $nameMap[$extensionLowerCase];
|
||||
}
|
||||
if (!extension_loaded($extension)) {
|
||||
fprintf(STDERR, sprintf("Extension not loaded: %s\n", $extension));
|
||||
} else {
|
||||
fprintf(STDOUT, sprintf("Extension correctly loaded: %s\n", $extension));
|
||||
$rc = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if (extension_loaded($extension)) {
|
||||
fprintf(STDOUT, sprintf("Extension correctly loaded: %s\n", $extension));
|
||||
exit(0);
|
||||
}
|
||||
fprintf(STDERR, sprintf("Extension not loaded: %s\n", $extension));
|
||||
exit(1);
|
||||
exit($rc);
|
||||
|
|
Loading…
Reference in New Issue