1
audizioni
newBB 5.1.0 error admin
  • 2024/1/9 8:00

  • audizioni

  • Just popping in

  • Posts: 18

  • Since: 2009/1/11


Good morning. I'm trying various modules on the updated site.
The newBB module gives me the following error on the administration side:
Error: Error: Call to undefined function exec() in file /modules/newbb/admin/index.php line 74
Can you help me?

http://www.audizioni.it
XOOPS Version XOOPS 2.5.11-Stable
PHP Version 8.1.23
MySQL Version 5.7.33-36-log
Server API fpm-fcgi
OS Linux
fsockopen On
post_max_size 25M
max_input_time 60
output_buffering 4096
max_execution_time 300
memory_limit 512M
file_uploads On
upload_max_filesize 25M

2
Mamba
Re: newBB 5.1.0 error admin
  • 2024/1/10 13:12

  • Mamba

  • Moderator

  • Posts: 11521

  • Since: 2004/4/23


It is possible that your PHP configuration isn't allowing the core function exec to be used
The function is often disabled on shared hosting servers, so check the php.ini file on the server and make sure that ’exec’ is not listed as part of "disable_functions" in php.ini

You can also check using the phpinfo() - see here how to do it
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

3
Mamba
Re: newBB 5.1.0 error admin
  • 2024/1/10 13:47

  • Mamba

  • Moderator

  • Posts: 11521

  • Since: 2004/4/23


If there are still problems, try to replace the function in /modules/newbb/admin/index.php starting on line 68:
le="color: #000000"><?php 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:

le="color: #000000"><?php 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.
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

4
audizioni
Re: newBB 5.1.0 error admin
  • 2024/1/10 22:39

  • audizioni

  • Just popping in

  • Posts: 18

  • Since: 2009/1/11


Thank you.
I tried removing "@", but the error remains.
Tomorrow morning I'll try this second solution and let you know

5
audizioni
Re: newBB 5.1.0 error admin
  • 2024/1/13 7:03

  • audizioni

  • Just popping in

  • Posts: 18

  • Since: 2009/1/11


Thank you, with this fixes it works

6
Mamba
Re: newBB 5.1.0 error admin
  • 2024/1/13 13:42

  • Mamba

  • Moderator

  • Posts: 11521

  • Since: 2004/4/23


I'm happy to hear it!

Thanks for reporting back!
Support XOOPS => DONATE
Use 2.5.11 | Docs | Modules | Bugs

Who's Online

211 user(s) are online (142 user(s) are browsing Support Forums)


Members: 0


Guests: 211


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits