Page 1 of 1

ImageMagick Studio errors when uploading image

Posted: 2008-07-20T07:33:55-07:00
by Patrick1970
When trying to upload a small test image from the computer, I get the following error:

Code: Select all

Exception 400: Memory allocation failed `/home/**username**/public_html/MagickStudio/workarea/
866fb6d1a4493c1d63e36790beea454a31e0674d964f882e506e24dbfb8fc38859e93a57ab4e86f15de0b
d01c31de51988c7ccfdd68caef7d448b306c771911b/MagickStudio.mpc':

    No such file or directory
In the error log the following messages can be found:

Code: Select all

[Sun Jul 20 07:46:11 2008] [error] [client xx.xx.xx.xx] [Sun Jul 20 07:46:11 2008] MagickStudio.cgi: Use of uninitialized value in string eq at /usr/lib/perl5/5.8.8/File/Copy.pm line 76., referer: http://www.domain.com/MagickStudio/scripts/MagickStudio.cgi?CacheID=1123430787.32542;Action=view
[Sun Jul 20 07:46:11 2008] [error] [client xx.xx.xx.xx] [Sun Jul 20 07:46:11 2008] MagickStudio.cgi: Use of uninitialized value in stat at /usr/lib/perl5/5.8.8/File/Copy.pm line 85., referer: http://www.domain.com/MagickStudio/scripts/MagickStudio.cgi?CacheID=1123430787.32542;Action=view
[Sun Jul 20 07:46:11 2008] [error] [client xx.xx.xx.xx] [Sun Jul 20 07:46:11 2008] MagickStudio.cgi: Use of uninitialized value in pattern match (m//) at /usr/lib/perl5/5.8.8/File/Copy.pm line 120., referer: http://www.domain.com/MagickStudio/scripts/MagickStudio.cgi?CacheID=1123430787.32542;Action=view
[Sun Jul 20 07:46:11 2008] [error] [client xx.xx.xx.xx] [Sun Jul 20 07:46:11 2008] MagickStudio.cgi: Use of uninitialized value in concatenation (.) or string at /usr/lib/perl5/5.8.8/File/Copy.pm line 122., referer: http://www.domain.com/MagickStudio/scripts/MagickStudio.cgi?CacheID=1123430787.32542;Action=view
Any idea what might cause this?

Re: ImageMagick Studio errors when uploading image

Posted: 2008-07-20T09:15:07-07:00
by magick
Let's make sure your ImageMagick / PerlMagick install is proper. Try this script from the command line:
  • use Image::Magick;

    $i1=Image::Magick->new();
    $x=$i1->Read('logo:');
    warn $x if "$x";
    $i1->Write('logo.mpc');
    $i2=Image::Magick->new();
    $x=$i2->Read('logo.mpc');
    warn $x if "$x";
Next, try your image at http://www.imagemagick.org/MagickStudio ... Studio.cgi. If it works there we can assume there is a problem with your MagickStudio installation.

Re: ImageMagick Studio errors when uploading image

Posted: 2008-07-20T11:32:47-07:00
by Patrick1970
Excuse my ignorance, but how do I run that script from the command line? You mean via SSH?

Re: ImageMagick Studio errors when uploading image

Posted: 2008-07-20T13:18:21-07:00
by magick
Sure, ssh should work.

Re: ImageMagick Studio errors when uploading image

Posted: 2008-07-21T03:15:37-07:00
by Patrick1970
I am not sure if I did this correctly, but I copied the script in a test.pl (/home/username/public_html/MagickStudio/scripts/test.pl) file.
I then ran the script as "perl test.pl" from the command line but didn't get any output.
==================
root@server [/home/username/public_html/MagickStudio/scripts]# cat test.pl
#!/usr/bin/perl -w
use Image::Magick;

$i1=Image::Magick->new();
$x=$i1->Read('logo:');
warn $x if "$x";
$i1->Write('logo.mpc');
$i2=Image::Magick->new();
$x=$i2->Read('logo.mpc');
warn $x if "$x";
exit();
=====================

When uploading the same image to the url you provided, it works fine of course.