I’m using exec function to do image resize in PHP using ImageMagick :
exec("convert $userfile -thumbnail $width x $height $userfile");
but the server support diabled this function and said it’s unsafe, and i can’t use it anymore
is there any other method to rezie image using ImageMagick rather than using exec ?
If they disabled
exec, they probably disabled all the other ways to open processes. Perhaps you should see if they’ll install the “imagick” PECL extension.That or you can convert your code to use the built-in GD stuff instead. Thumbnailing is easy.
I’d personally recommend using a well-developed third-party library for this. Imagine is pretty nifty, for example.