imagemagick not working... but on same server
Posted: 2010-08-18T05:53:06-07:00
Ran into a strange problem.
I have two sites on a server, one site is running all imagemagick commands just fine but the other isn't... yet they are both being run on the same server.
The only difference between the two is that I am running codeigniter on the new site I'm working on that has an htaccess file to do some mod rewrites but I can't fathom how that could effect anything.
So here is the code ( and remember this code works perfectly on the other site ).
Also note that when using convert -version, it does show the correct version.
And here is the error:
I have two sites on a server, one site is running all imagemagick commands just fine but the other isn't... yet they are both being run on the same server.
The only difference between the two is that I am running codeigniter on the new site I'm working on that has an htaccess file to do some mod rewrites but I can't fathom how that could effect anything.
So here is the code ( and remember this code works perfectly on the other site ).
Code: Select all
$path = "/opt/local/bin/";
$impath = '/working/www/brochure/html/imagemagick/brochure/customizable/';
$fontpath = '/working/www/brochure/html/imagemagick/fonts/';
$titlefont = 'dots.TTF';
$req = $_REQUEST['/brochure/imagick/page'];
$req = explode("/", $req);
$page = $req[0];
$option = $req[1];
if ($page == 'page1') {
$query = "select * from static_text where id = '".($option+1)."'";
$result = $this->db->query($query);
$row = $result->row();
$title = $row->title;
$content = nl2br($row->content);
$comptitle = $path."convert -font ".$titlefont." -density 150 -pointsize 72 -background none -fill '#cc6724' label:'".$title."' ".$impath."composite/title.png";
$res = exec($comptitle, $rez);
}
And here is the error:
Code: Select all
convert: missing an image filename `title.png' @ error/convert.c/ConvertImageCommand/2970.
sh: gs: command not found
sh: gs: command not found
convert: unable to read font `dots.TTF' @ warning/annotate.c/RenderType/807.
convert: unable to read font `dots.TTF' @ error/annotate.c/RenderFreetype/1056.
convert: Postscript delegate failed `/var/tmp/magick-8Zhq3h64': No such file or directory @ error/ps.c/ReadPSImage/779.
convert: missing an image filename `title.png' @ error/convert.c/ConvertImageCommand/2970.