switch off warning messages about disabled shell_exec

5 posts by 2 authors in: Forums > CMS Builder
Last Post: February 25, 2020   (RSS)

By daniel - February 11, 2020

Hi Karls,

It can be difficult to selectively filter out error messages without fixing the cause of the error, however, it sounds like you're probably on a host that will not let you re-enable that function so properly fixing it may not be possible.

Could you paste the full details of the error message, including the file and line number? This may help point to some options for how to suppress the error.

Thanks!

Daniel
Technical Lead
interactivetools.com

Hi Daniel,

#27 - E_WARNING: shell_exec() has been disabled for security reasons
/home/hilaris/public_html/cmsAdmin/lib/file_functions.php (line 297)

Thank you,
Karls

By daniel - February 18, 2020

Hi Karls,

Thanks for getting me that info. I've found the issue and added a patch to be released in the next CMSB version. In the meantime, it's a pretty simple fix to add yourself. In the file "cmsb/lib/file_functions.php" look near the bottom of the file for this line (at or around line 285):

  if (!$is_open_basedir_restrictions) { return $r; }

And add this line right below it:

  if (!function_exists("shell_exec")) { return false; }

Let me know if that does the trick, or if you have any other questions.

Thanks!

Daniel
Technical Lead
interactivetools.com

Hi Daniel,

Thank you for this quick fix!

Regards,
Karls