Title: exec()
Last modified: August 22, 2016

---

# exec()

 *  [bohemiandiesel](https://wordpress.org/support/users/bohemiandiesel/)
 * (@bohemiandiesel)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/exec/)
 * One 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/](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/](https://wordpress.org/plugins/cw-image-optimizer/)

Viewing 3 replies - 1 through 3 (of 3 total)

 *  [leventuresllc](https://wordpress.org/support/users/leventuresllc/)
 * (@leventuresllc)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/exec/#post-5495925)
 * 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'));
       ```
   
 *  [leventuresllc](https://wordpress.org/support/users/leventuresllc/)
 * (@leventuresllc)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/exec/#post-5495926)
 * [@bohemiandiesel](https://wordpress.org/support/users/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.
 *  [leventuresllc](https://wordpress.org/support/users/leventuresllc/)
 * (@leventuresllc)
 * [11 years, 6 months ago](https://wordpress.org/support/topic/exec/#post-5495927)
 * To: Plugin Author, have you considered using shell_exec() on systems that disable
   exec?

Viewing 3 replies - 1 through 3 (of 3 total)

The topic ‘exec()’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/cw-image-optimizer.svg)
 * [CW Image Optimizer](https://wordpress.org/plugins/cw-image-optimizer/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/cw-image-optimizer/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/cw-image-optimizer/)
 * [Active Topics](https://wordpress.org/support/plugin/cw-image-optimizer/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/cw-image-optimizer/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/cw-image-optimizer/reviews/)

## Tags

 * [exec](https://wordpress.org/support/topic-tag/exec/)

 * 3 replies
 * 2 participants
 * Last reply from: [leventuresllc](https://wordpress.org/support/users/leventuresllc/)
 * Last activity: [11 years, 6 months ago](https://wordpress.org/support/topic/exec/#post-5495927)
 * Status: not resolved