Error executing ImageMagick - Return value: 1 Error executing ImageMagick - Return value: 1
 

News:

CPG Release 1.6.26
Correct PHP8.2 issues with user and language managers.
Additional fixes for PHP 8.2
Correct PHP8 error with SMF 2.0 bridge.
Correct IPTC supplimental category parsing.
Download and info HERE

Main Menu

Error executing ImageMagick - Return value: 1

Started by MrMyles, April 25, 2006, 02:57:17 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MrMyles

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:
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.

Stramm

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

Quote from: Stramm 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

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.

MrMyles

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?

Joachim Müller


Stramm


MrMyles

Quote from: GauGau on April 27, 2006, 07:57:46 AM
why not use GD instead?

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

Quote from: Stramm on April 27, 2006, 09:06:37 AM
and try yourself
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

Stramm

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

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.


Stramm


<?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

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.

<?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.

Stramm

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

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

MrMyles

Fixed.

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

Myles

Stramm