Jump to content

Imagemagick Help!!


machoman

Recommended Posts

Hey guys,

Any help on this would be very very appreciated.  I've been scratching my head for some time now.  I'm running php on a hosted server, and what's confusing is that the script i've been using has worked for months now and suddenly it isn't. The hosting company assures me that they have changed nothing on the server, including imagicmagick.  I'm having a hard time believe this but i'm not sure.

i'm attempting to upload 2 images to a directory called avatars. One image is the original uploaded image (using move_uploaded_file) and another is a resized image using ImageMagick.

in this snippet of code, $_SESSION['uid'] and $av_key are unique numbers specific to a user which i use name images



$filename = "avatars/" . $_SESSION['uid'] . "-" . $av_key;

system("convert -size 130x220 " . $_FILES['imagefile']['tmp_name'] . " -resize 130x220 +profile \"*\" " . $filename);

if(!move_uploaded_file($_FILES['imagefile']['tmp_name'],"avatars/original" . $_SESSION['uid'] . '-' . $av_key)){
    $alert = "An error was encountered";
}


using move_uploaded_file, an image is successful created and moved to avatars with the correct name.

however, creating the resized image is not working.  it's not showing up in the avatars directory and I'm not sure how to detect where it breaks down - if imagemagick is working properly, if it's possibly permissions, etc...

what gets me is that this code has been working for a long time now. any ideas, insights would be greatly appreciated. also, what to communicate back to the hosting company would be helpful, b/c right now we are kind of at a deadlock on how to resolve the issue.  and, any info that i'm not including that would be helpful i will relay over.  thanks
Link to comment
https://forums.phpfreaks.com/topic/25890-imagemagick-help/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.