I am attempting to change the size of an image with imageMagick, using the exec() function in php. I am doing the mogrify command:

mogrify -density 72x72 -geometry 80x80! filename.jpg

When I do this, nothing happens.

I figure it is a permissions problem because if I do it as a normal user from the command line I get the following error:

mogrify: Unable to open file (8magicUBTNPO) [Permission denied]

So it would seem it might be a temporary file that the permissions are having trouble with.

Any help would be nice. Thanks

    a year later

    Im having this problem too, i can do it as root from the command line, though i cant within a user directory. I think the linux su command can be used somehow, investigating.........

      2 months later

      I'm also having this problem but mine's weirder... it used to work before... even if the owner of the image is nobody:nobody (Apache).

        I fixed mine by specifying the location of mogrify... i.e. /usr/X11R6/bin/mogrify...

          Write a Reply...