mirror of
https://github.com/mlocati/docker-php-extension-installer
synced 2025-05-09 00:22:40 +00:00
Fix installing ionCube in multiarch, fix installing SourceGuardian for 32-bit PHP (#444)
This commit is contained in:
parent
f81f0cd1a2
commit
cdda8c2bdd
2 changed files with 95 additions and 36 deletions
24
scripts/tests/ioncube_loader
Executable file
24
scripts/tests/ioncube_loader
Executable file
|
@ -0,0 +1,24 @@
|
|||
#!/usr/bin/env php
|
||||
<?php
|
||||
|
||||
require_once __DIR__ . '/_bootstrap.php';
|
||||
|
||||
$rc = 0;
|
||||
foreach ([false => 'PHP module', true => 'Zend extension'] as $type => $typeName) {
|
||||
$extensions = get_loaded_extensions($type);
|
||||
$found = '';
|
||||
foreach ($extensions as $extension) {
|
||||
if (preg_match('/^(the )?ioncube (php )?loader/i', $extension)) {
|
||||
$found = $extension;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
if ($found !== '') {
|
||||
fwrite(STDOUT, "The {$found} {$typeName} is loaded.\n");
|
||||
} else {
|
||||
fwrite(STDERR, "The ionCube Loader {$typeName} is not loaded.\nLoaded extensions are: \n- " . implode("\n- ", $extensions));
|
||||
$rc = 1;
|
||||
}
|
||||
}
|
||||
exit($rc);
|
Loading…
Add table
Add a link
Reference in a new issue