php - exec() permission denied on second imagemagick command -


i can not figure out, run following commands, , first 1 works fine, run second 1 , permission denied. have tried using chmod() , doesn't work, stumped...

// line works: exec("$this->convert '$this->background' -resize 250 '$this->name'", $opt);  // line gives permission denied: exec("$this->mogrify xc:black -font '$font' -pointsize $font_size -draw \"text 240,10 '5'\" '$this->name'", $opt); 

here better look:

protected $convert    = "/usr/local/bin/convert"; protected $mogrify    = "/usr/local/bin/mogrify";  public function display($format = turing::jpg, $quality = 100){     // create image random background     exec("$this->convert '$this->background' -resize 250 '$this->name'", $opt);     $this->_buildtext(); }  protected function _buildtext(){     $text = $this->turing;     for($i = 0; $i < strlen($text); $i++){         $font      = $this->getfont();         $angle     = $this->getangle();         $font_size = $this->getfont(35, 45);         if(stripos($font, "kidnap_note") !== false){             $font_size = $this->getfont(45, 50);         }         $x = (40 - ($this->step / 2) + $i * 45);         $y = 50;         $opt = null;         exec($q="$this->convert '$this->name' xc:black -font '$font' -pointsize $font_size -draw \"text 240,10 '{$text[$i]}'\" '$this->name'", $opt);     } } 


Comments

Popular posts from this blog

php - SPIP: From Tag directly to an article -

jquery - isAjaxRequest always return false -

ruby on rails - In a controller spec, how to find a specific tag in the generated view? -