3
If there are still problems, try to replace the function in /modules/newbb/admin/index.php starting on line 68:
function newbb_getImageLibs()
{
$imageLibs = [];
// unset($output, $status);
if (1 == $GLOBALS['xoopsModuleConfig']['image_lib'] || 0 == $GLOBALS['xoopsModuleConfig']['image_lib']) {
$path = empty($GLOBALS['xoopsModuleConfig']['path_magick']) ? '' : $GLOBALS['xoopsModuleConfig']['path_magick'] . '/';
@exec($path . 'convert -version', $output, $status);
if (empty($status) && !empty($output) && preg_match("/imagemagick[ t]+([0-9.]+)/i", $output[0], $matches)) {
$imageLibs['imagemagick'] = $matches[0];
}
unset($output, $status);
}
if (2 == $GLOBALS['xoopsModuleConfig']['image_lib'] || 0 == $GLOBALS['xoopsModuleConfig']['image_lib']) {
$path = empty($GLOBALS['xoopsModuleConfig']['path_netpbm']) ? '' : $GLOBALS['xoopsModuleConfig']['path_netpbm'] . '/';
@exec($path . 'jpegtopnm -version 2>&1', $output, $status);
if (empty($status) && !empty($output) && preg_match("/netpbm[ t]+([0-9.]+)/i", $output[0], $matches)) {
$imageLibs['netpbm'] = $matches[0];
}
unset($output, $status);
}
if (function_exists('gd_info')) {
$tmpInfo = gd_info();
$imageLibs['gd'] = $tmpInfo['GD Version'];
}
return $imageLibs;
}
with this code:
function getPhpInfo($section = INFO_GENERAL)
{
static $infoCache = [];
if (!isset($infoCache[$section])) {
ob_start();
phpinfo($section);
$infoCache[$section] = ob_get_clean();
}
return $infoCache[$section];
}
function newbb_getImageLibs()
{
$imageLibs = [];
// Check for GD library
if (function_exists('gd_info')) {
$tmpInfo = gd_info();
$imageLibs['gd'] = $tmpInfo['GD Version'];
}
$info = (array)getPhpInfo();
// Check for ImageMagick
if (1 == $GLOBALS['xoopsModuleConfig']['image_lib'] || 0 == $GLOBALS['xoopsModuleConfig']['image_lib']) {
if (preg_match("/ImageMagicks+([0-9\.]+)/i", implode(" ", $info), $matches)) {
$imageLibs['imagemagick'] = $matches[1];
}
}
// Check for NetPBM
if (2 == $GLOBALS['xoopsModuleConfig']['image_lib'] || 0 == $GLOBALS['xoopsModuleConfig']['image_lib']) {
if (preg_match("/netpbms+([0-9\.]+)/i", implode(" ", $info), $matches)) {
$imageLibs['netpbm'] = $matches[1];
}
}
return $imageLibs;
}
and let me know if it helps.