Conversation
supportOne a User has written: I’m getting the following error message after installing the plugin CW Image Optimizer requires exec(). Your system administrator has disabled this function. Warning: exec() has been disabled for security reasons in /home/xyz/public_html/wp-content/plugins/cw-image-optimizer/cw-image-optimizer.php on line 67 http://wordpress.org/extend/plugins/cw-image-optimizer/ ——— So what is the solution for? How can I enable exec()? Regards, Andy https://wordpress.org/plugins/cw-image-optimizer/
I found a typo on Centos. ini_get(‘disable_functions’) returns a csv list without spaces. So line 83 in cw-image-optimizer.php works when I implode without the extra space in the delimiter field. You may want to add some kind of array check. $disabled = explode(',', ini_get('disable_functions'));
@bohemiandiesel , if you have system access, check your php.ini for disable_functions = exec,blah,blah,blah Then you’d have to remove the ‘exec’ and restart apache. If you are on a shared host, you should check with your hosting provider.
To: Plugin Author, have you considered using shell_exec() on systems that disable exec?
I found a typo on Centos. ini_get(‘disable_functions’) returns a csv list without spaces. So line 83 in cw-image-optimizer.php works when I implode without the extra space in the delimiter field. You may want to add some kind of array check. $disabled = explode(',', ini_get('disable_functions'));
@bohemiandiesel , if you have system access, check your php.ini for disable_functions = exec,blah,blah,blah Then you’d have to remove the ‘exec’ and restart apache. If you are on a shared host, you should check with your hosting provider.
To: Plugin Author, have you considered using shell_exec() on systems that disable exec?