开发者

excute the image magic commands with php

I want to convert pdf to image so that install the image magic and ghost script.when i run command "convert file.pdf image.png" into terminal then work file but when i run in exec using php show me error in apache log "/var/root/Desktop/ImageMagick-6.6.4/bin/convert: Permission denied".I install php in Mac.in 开发者_开发问答my php file i give the perfetc path also as exec("/var/root/Desktop/ImageMagick-6.6.4/bin/convert ".getcwd().'/'."filename.pdf[2] ".getcwd().'/'.$filename).

have dream day


Problems like this usually relates to the fact that apache is executed as a different user than the one you use to execute the command manually. You will have to change permissions or ownership of the source and destination files in a way that will allow the apache user (probably www-data) to read and write the data. (and execute convert)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜