|
|
nahual |
|
|
Posts: 68
Posts Per Day: 0.11
Reputation: 100.00%
Reputation Score: +2 / -0
Time Online: 1 days 13 hours 15 minutes
Location: Baja California, Mexico
|
Hi, I can't make upload resize mod to work in my forum hosted with yahoo: when i try to upload an image i always get "Can't find convert. No ImageMagick. Error 32512". I know this mod works nicely in 10.2.5 vesion as i have it installed in another ebalh "test" forum with another host provider. As read in yahoo hosting help, it supports Imagemagick but i dont know for sure if this means that it is already installed. How can i know?  Any ideas? thanks for your time |
| |
|
|
|
|
|
nahual |
|
|
Posts: 68
Posts Per Day: 0.11
Reputation: 100.00%
Reputation Score: +2 / -0
Time Online: 1 days 13 hours 15 minutes
Location: Baja California, Mexico
|
Anyone?  |
| |
|
|
|
|
|
Martin |
|
|
Posts: 4,558
Gender:  Male
Posts Per Day: 3.13
Reputation: 98.60%
Reputation Score: +211 / -3
Time Online: 35 days 19 hours 25 minutes
Location: UK
Age: 50
|
You need to contact the host and ask them:
1. Is it installed?
2. The path to convert
Then I could help. |
| Martin's Reputation: Increase |
|
|
|
|
|
nahual |
|
|
Posts: 68
Posts Per Day: 0.11
Reputation: 100.00%
Reputation Score: +2 / -0
Time Online: 1 days 13 hours 15 minutes
Location: Baja California, Mexico
|
Ok, I asked the monkeys at yahoo web hosting customer service and they told me that imagemagick as a perl module is supported and installed http://help.yahoo.com/help/us/webhosting/perl/perl-21.html The path as they said would be the same as the one for perl: #!/usr/bin/perl Do you think this can handle the resize mod?? Thanks for your valuable time |
| |
|
|
|
|
|
nahual |
|
|
Posts: 68
Posts Per Day: 0.11
Reputation: 100.00%
Reputation Score: +2 / -0
Time Online: 1 days 13 hours 15 minutes
Location: Baja California, Mexico
|
|
|
|
|
|
Martin |
|
|
Posts: 4,558
Gender:  Male
Posts Per Day: 3.13
Reputation: 98.60%
Reputation Score: +211 / -3
Time Online: 35 days 19 hours 25 minutes
Location: UK
Age: 50
|
I'll see what I can do but 99% of the time the call for convert is picked up automatically if Imagmagick is installed correctly.
I would still like you to ask your host what the path to "convert" is. |
| Martin's Reputation: Increase |
|
|
|
|
|
nahual |
|
|
Posts: 68
Posts Per Day: 0.11
Reputation: 100.00%
Reputation Score: +2 / -0
Time Online: 1 days 13 hours 15 minutes
Location: Baja California, Mexico
|
Hi Martin, thank you for your reply but I was unable to get path to "convert" at my host's customer service. They just don't know!!! How do i specify a path in this resize mod? I dont know the exact path but i want to test some ideas...
|
Code
<author="Warlock">
<modname="Image Upload Resize">
<version="2">
<boardversion="Platinum 9.5">
<site="http://www.pcfixzone.co.uk">
<desc="Automatically resizes uploaded images using Imagemacick.<br>Code originally posted by Tess">
<openfile="Code/Attach.pl" writes="1">
<mod search="1">
while($bytesread = read($file,$buffers,1024)) { print OUTFILE $buffers; }
fclose(OUTFILE);
</mod end>
<mod write="1" action="1">
### ----New code to call ImageMagick here----
#
# We duplicate the check for 0 file size here for error checking the upload
$savedsize = -s($savedfile);
if($savedsize == 0) { unlink($savedfile);
if($FORM{'tempopen'} ne '') { $error = $atext[4]; clear_temp(); return();
}
else
{ clear_temp(); error($atext[4]); }
}
# Now we actually call convert if its a jpg or a gif file
if ($fnchk eq "jpg" || $fnchk eq "gif" || $fnchk eq "png") {
$exit_code = system("convert -sample 400x400\\> $savedfile $savedfile");
#ImageMagic Version 5 style command
# The \\> is needed to double escape the > symbol so convert does not make
# small images bigger! Edit the 400x400 to specify the max image size.
if ($exit_code != 0) {
clear_temp();
if ($exit_code == 256)
{ error("ImageMagick can't deal with your file type. Error 256"); }
if ($exit_code == 32512)
{ error("Can't find convert. No ImageMagick. Error 32512"); }
# and everything else...
error("ImageMagick croked with Error: " . $exit_code);
}
}
#
### ----New code ends ----
</mod end> |
|
|
| |
|
|
|
|
|
Martin |
|
|
Posts: 4,558
Gender:  Male
Posts Per Day: 3.13
Reputation: 98.60%
Reputation Score: +211 / -3
Time Online: 35 days 19 hours 25 minutes
Location: UK
Age: 50
|
You need to put it in front of convert
$exit_code = system("convert -sample 400x400\\> $savedfile $savedfile");
will become:
$exit_code = system("$path/convert -sample 400x400\\> $savedfile $savedfile"); |
| Martin's Reputation: Increase |
|
|
|
|
|
nahual |
|
|
Posts: 68
Posts Per Day: 0.11
Reputation: 100.00%
Reputation Score: +2 / -0
Time Online: 1 days 13 hours 15 minutes
Location: Baja California, Mexico
|
Thank you Martin, could not make it work. It seems like imagemagick is only "half installed" at my host... |
| |
|
|
|
|
|
Martin |
|
|
Posts: 4,558
Gender:  Male
Posts Per Day: 3.13
Reputation: 98.60%
Reputation Score: +211 / -3
Time Online: 35 days 19 hours 25 minutes
Location: UK
Age: 50
|
Try this:
|
Code
### ----New code to call ImageMagick here----
#
# We duplicate the check for 0 file size here for error checking the upload
$savedsize = -s($savedfile);
if($savedsize == 0) { unlink($savedfile);
if($FORM{'tempopen'} ne '') { $error = $atext[4]; clear_temp(); return();
}
else
{ clear_temp(); error($atext[4]); }
}
# Now we actually call convert if its a jpg or a gif file
if ($fnchk eq "jpg" || $fnchk eq "gif" || $fnchk eq "png") {
require GD;
$exit_code = system("convert -sample 400x400\\> $savedfile $savedfile");
#ImageMagic Version 5 style command
# The \\> is needed to double escape the > symbol so convert does not make
# small images bigger! Edit the 400x400 to specify the max image size.
if ($exit_code != 0) {
clear_temp();
if ($exit_code == 256)
{ error("ImageMagick can't deal with your file type. Error 256"); }
if ($exit_code == 32512)
{ error("Can't find convert. No ImageMagick. Error 32512"); }
# and everything else...
error("ImageMagick croked with Error: " . $exit_code);
}
}
#
### ----New code ends ----
|
|
|
| Martin's Reputation: Increase |
|
|
|
|
|
nahual |
|
|
Posts: 68
Posts Per Day: 0.11
Reputation: 100.00%
Reputation Score: +2 / -0
Time Online: 1 days 13 hours 15 minutes
Location: Baja California, Mexico
|
Martin, Thanks for your time, but that did not work. I already change to another host and my problem is now over, thanks again. |
| |
|
|
|
|
|
|