Advanced search  

News:

cpg1.5.48 Security release - upgrade mandatory!
The Coppermine development team is releasing a security update for Coppermine in order to counter a recently discovered vulnerability. It is important that all users who run version cpg1.5.46 or older update to this latest version as soon as possible.
[more]

Pages: [1]   Go Down

Author Topic: Error executing ImageMagick - Return value: 1  (Read 24499 times)

0 Members and 1 Guest are viewing this topic.

MrMyles

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Error executing ImageMagick - Return value: 1
« on: April 25, 2006, 02:57:17 am »

I know, I know. Search the error.
I did. after 7 pages and no solution (and I did try the ones mentioned, if I could), I decided to post.
And I read "http://coppermine-gallery.net/demo/cpg14x/docs/index.htm#upload_trouble" twice, but still no answer.

- I can upload gif files, with no issue. But the gallery needs to accept digital photo's so I need jpg's.
- Default file types was all but I set to jpg/jpe/gif with no difference.
- Files do indeed get uploaded to the derver. I can see them and download them directly or via FTP. Coppermine does not accpet them though.
- All directories have the correct permissions. Yes, I checked. Twice. Even gave them incorrect permissions to check.
- GD is not an option (yet).
- Path to IM is correct.
- Upload set to one, debug on.
- Coppermine was installed via Application Vault in Plesk. Willing to reinstall manually if needed.
- OS is Linux.
- Test account set up. - http://www.everfree.ca/coppermine - user: tester - pass: test

Error Returned is:
Code: [Select]
The file 'albums/userpics/10001/500LogoBk1~1.jpg' can't be inserted in the album

Error executing ImageMagick - Return value: 1


Cmd line :
/usr/local/bin/convert -quality 80 -antialias -geometry 85x65 'albums/userpics/10001/500LogoBk1~1.jpg' 'albums/userpics/10001/thumb_500LogoBk1~1.jpg'


The convert program said:
convert: no decode delegate for this image format `albums/userpics/10001/500LogoBk1~1.jpg'.
convert: missing an image filename `albums/userpics/10001/thumb_500LogoBk1~1.jpg'.

Any help is much appreciated. I just started this so if a complete reinstall of the latest coppermine is required, I would prefer to do it now. But if it can be fixed simply, even better.

Thanks

Myles

Edit: added more info about files being uploaded.
« Last Edit: April 27, 2006, 07:24:37 pm by Stramm »
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Error executing ImageMagick - Return value: 1
« Reply #1 on: April 25, 2006, 08:42:33 am »

my guess is you installed IMageMagick without jpg support (the lib wasn't installed when you installed ImageMagick)
check with: identify -list format
ig jpg is listed with a mode of '---' or isn't listed at all then install the jpg lib and rebuild IMageMagick

MrMyles

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Error executing ImageMagick - Return value: 1
« Reply #2 on: April 25, 2006, 02:43:49 pm »

my guess is you installed IMageMagick without jpg support (the lib wasn't installed when you installed ImageMagick)
check with: identify -list format
ig jpg is listed with a mode of '---' or isn't listed at all then install the jpg lib and rebuild IMageMagick

I personally cannot do this. But my hosting provider sure can.
Thanks for the help.
I will post back once I hear back from them.
Logged

MrMyles

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Error executing ImageMagick - Return value: 1
« Reply #3 on: April 27, 2006, 06:13:58 am »

Did not work.
They did a complete reinstall of ImageMagick with jpeg support.
Still get "Error executing ImageMagick - Return value: 1"
"The convert program said:
convert: no decode delegate for this image format"

Any other suggestions?
Logged

Joachim Müller

  • Dev Team member
  • Coppermine addict
  • ****
  • Offline Offline
  • Gender: Male
  • Posts: 47843
  • aka "GauGau"
    • gaugau.de
Re: Error executing ImageMagick - Return value: 1
« Reply #4 on: April 27, 2006, 07:57:46 am »

why not use GD instead?
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Error executing ImageMagick - Return value: 1
« Reply #5 on: April 27, 2006, 09:06:37 am »

and try yourself
Code: [Select]
identify -list format

MrMyles

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Error executing ImageMagick - Return value: 1
« Reply #6 on: April 27, 2006, 02:44:07 pm »

why not use GD instead?

It is not installed on the server. Neither 1.X or 2.X.
Just IM.

and try yourself
Code: [Select]
identify -list format

No idea how. Never had to do it before. Give me a little more info other than that, and I will certainly test it out.
Or, if anyone has a way to test ImageMagick without Coppermine, let me know and I will do that as well.

Thanks

Myles
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Error executing ImageMagick - Return value: 1
« Reply #7 on: April 27, 2006, 04:03:45 pm »

open a shell (ssh, ssh2) and then type that command. This is to check if your host really has installed the lib and if ImageMagick is actually using the jpg lib.

MrMyles

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Error executing ImageMagick - Return value: 1
« Reply #8 on: April 27, 2006, 04:15:42 pm »

Thanks, but I do not have shell access.
Third hosting provider I have had, and none have offered shell access.
Unless I upgrade to premium packages or pay for the addon.

Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Error executing ImageMagick - Return value: 1
« Reply #9 on: April 27, 2006, 04:48:30 pm »

Code: [Select]
<?php
/*
create a folder, chmod 777
upload that file, name it eg. test.php
in the same folder upload a bigger picture (jpg)

modify the variables below to fit your needs
*/

$big_image "job.jpg";  //name of the bigger image
$IM_path '/usr/bin/';  //path to ImageMagick... win eg 'e:\\ImageMagick\\' note the double slashes
//to test composite upload a second, smaller file too, uncomment the composite cmd
//and comment out the convert cmd
//$small_image = "escher.jpg";     //name of the small image


$temp_file 'tmp.jpg';
//Create the command

//resizes the $big_image to 120px max
$cmd $IM_path."convert -resize 120x120 $big_image $temp_file";
//$small_image in $big_image
//$cmd = $IM_path."composite -geometry +0+0 $small_image $big_image $temp_file";
//Execute the command
exec($cmd);

//Open the tmp file for binary read
$fp fopen($temp_file"rb");
//Read binary data from file
$data fread($fpfilesize($temp_file));

//Close file
fclose($fp);

//Delete File
unlink($temp_file);
header("Content-type: image/jpeg");
print 
$data;
?>

MrMyles

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Error executing ImageMagick - Return value: 1
« Reply #10 on: April 27, 2006, 05:11:07 pm »

Thanks.

I tried this, set the variable to my image name, and location of IM.

Se the directory to 777, upload everything and went to test.php.

Screen is blank, no source code to view.
Title name turns into "test.php.jpg"
Right click lets me "save image to desktop"
download the "image" and it is a an empty text file with a jpg extension.
look in server, no new files, existing files have not changed.
did I miss something or do something wrong?
see code below for my changes.

Code: [Select]
<?php
/*
create a folder, chmod 777
upload that file, name it eg. test.php
in the same folder upload a bigger picture (jpg)

modify the variables below to fit your needs
*/

$big_image "amr_flaming_planet.jpg";  //name of the bigger image
$IM_path '/usr/local/bin/';  //path to ImageMagick... win eg 'e:\\ImageMagick\\' note the double slashes
//to test composite upload a second, smaller file too, uncomment the composite cmd
//and comment out the convert cmd
//$small_image = "amr_flaming_planet.jpg";     //name of the small image


$temp_file 'tmp.jpg';
//Create the command

//resizes the $big_image to 120px max
$cmd $IM_path."convert -resize 120x120 $big_image $temp_file";
//$small_image in $big_image
//$cmd = $IM_path."composite -geometry +0+0 $small_image $big_image $temp_file";
//Execute the command
exec($cmd);

//Open the tmp file for binary read
$fp fopen($temp_file"rb");
//Read binary data from file
$data fread($fpfilesize($temp_file));

//Close file
fclose($fp);

//Delete File
unlink($temp_file);
header("Content-type: image/jpeg");
print 
$data;
?>

Thanks allot for the help.
Much appreciated.
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Error executing ImageMagick - Return value: 1
« Reply #11 on: April 27, 2006, 05:18:10 pm »

if you typed in the correct path to ImageMagick and a valid filename of an image in the same dir as the script... then you should see a thumb of that image in your browser window

you can comment out
unlink($temp_file);

then the created image will stay in your scripts directory.
If you get junk... then there are some possibilities
a) wrong path to ImageMagick
b) no valid image name
c) ImageMagick not properly installed
etc...
talk to your host

MrMyles

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Error executing ImageMagick - Return value: 1
« Reply #12 on: April 27, 2006, 05:25:05 pm »

I got nuttin.
Even after commenting out the unlink.
Nuttin on screen. Nuttin on the sever.

Back to the hosting company for some resolution.
Problem certainly does not involve Coppermine.
Thanks for all the help.

Myles
Logged

MrMyles

  • Coppermine newbie
  • Offline Offline
  • Posts: 8
Re: Error executing ImageMagick - Return value: 1
« Reply #13 on: April 28, 2006, 03:36:50 pm »

Fixed.

They reinstalled the most current versions of IM and now it works.
Thanks for all the help.

Myles
Logged

Stramm

  • Dev Team member
  • Coppermine addict
  • ****
  • Country: 00
  • Offline Offline
  • Gender: Male
  • Posts: 6006
    • Bettis Wollwelt
Re: Error executing ImageMagick - Return value: 1
« Reply #14 on: April 28, 2006, 03:54:30 pm »

good top hear and thanks for getting back ;)
Pages: [1]   Go Up
 

Page created in 0.023 seconds with 20 queries.