switch off warning messages about disabled shell_exec
5 posts by 2 authors in: Forums > CMS Builder
Last Post: February 25, 2020 (RSS)
By ht1080z - February 10, 2020
Hi,
Is there any way to switch off the warning messages (that creating all the time) about the disabled shell_exec() php function?
#18 - E_WARNING: shell_exec() has been disabled for security reasons
I'm really loosing the important error or warning messages from these that creating all the time.
Thank you,
Karls
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!
Technical Lead
interactivetools.com
By ht1080z - February 11, 2020
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!
Technical Lead
interactivetools.com