Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am getting this error from

tail -f /var/log/nginx/error.log

    2013/05/02 05:36:58 [error] 720#0: *90 FastCGI sent in stderr: "PHP message: PHP Warning:  exec(): Unable to fork [which opt-png] in /var/www/www.mysite.com/web/wp-content/plugins/cw-image-optimizer/cw-image-optimizer.php on line 67

PHP message: PHP Warning:  exec(): Unable to fork [which opt-jpg] in /var/www/www.mysite.com/web/wp-content/plugins/cw-image-optimizer/cw-image-optimizer.php on line 67

The plugin (cw-image-optimizer) worked fine in every server I used in the last couple of years, but I am getting this error on this server.

The line of code on line 67 is:

    $result = trim(exec('which ' . $req));

The context of the code:

foreach($required as $key => $req){
        $result = trim(exec('which ' . $req));
        if(!$skip && empty($result)){
            $missing[] = $req;
            define('CW_IMAGE_OPTIMIZER_' . $key, false);
            define('CW_IMAGE_OPTIMIZER_' . $key, true);

Any idea whats wrong? I get an error on the wordpress dashboard that:

You are missing: opt-png, opt-jpg, opt-gif.

It only happens 20-30 minutes after the server it booted up, before that it works fine.

share|improve this question
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.