php - exec convert works on SSH fine but not in script -
i have script convert pdf images $targetpath = 'test.pdf'; $location = "/usr/local/bin/convert"; $randomnum = time(); $nameto = $randomnum.".jpg"; $convert = $location. " -density 150 " . $targetpath . " " . $nameto; exec($convert); where $convert like /usr/local/bin/convert -density 150 path/test-1430326864.pdf path/1430326864.jpg when execute command on ssh, gives desired output, in php script doesn't convert pdf images. same script convert of pdf images successfully, not pdfs images is there issue in script or how can fix this, every pdf convert successfully? update: changed exec code.. in php script exec($convert, $output); echo '<pre>'; var_dump($output); die(); then, got following output array(9) { [0]=> string(32) "error: /invalidfont in /findfont" [1]=> string(14) "operand stack:" [2]=> string(97) " --dict:7/16(l)-- f0 9.