Welcome to the E-Blah Community!
We would like to welcome you to our community and invite you to register an account or login.
Being a registered member is important, as it gives you several advantages over the normal Guest status. After registering you will be able to download files and images, post messages, and access member-only portions of the forum - just to name a few. Registration is quick and simple, and only takes about a minute of your time.

E-Blah Community    Modifications    Mod Requests and Support  ›  Upload resize Moderators: 10 Series Support Team
Users Browsing Forum
No Members and 1 Guests

Upload resize  This thread currently has 614 views. Print
1 Pages 1 Recommend Thread
nahual
May 21, 2007, 8:57pm Report to Moderator Report to Moderator

E-Blah Member
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


Luis Larios
forum:  http://www.fororeptiles.com
Logged Offline
Private Message Private message
nahual
May 22, 2007, 11:24am Report to Moderator Report to Moderator

E-Blah Member
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?    


Luis Larios
forum:  http://www.fororeptiles.com
Logged Offline
Private Message Private message Reply: 1 - 10
Martin
May 22, 2007, 11:43am Report to Moderator Report to Moderator

I love E-Blah
10 Series Support Team
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
Logged Offline
Site Site Private Message Private message Reply: 2 - 10
nahual
May 24, 2007, 11:37am Report to Moderator Report to Moderator

E-Blah Member
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


Luis Larios
forum:  http://www.fororeptiles.com
Logged Offline
Private Message Private message Reply: 3 - 10
nahual
May 24, 2007, 9:39pm Report to Moderator Report to Moderator

E-Blah Member
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
Quoted from nahual
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


I found the yahoo hosting right path to imagemagick perl module:
/usr/lib/perl5/site_perl/Image

I took the above info from here: http://webmaster-showcase.net/yahoo/perl.php?d=/usr/lib/perl5/site_perl/Image

How can i use this info to fix the resize mod to work on my forum??


Luis Larios
forum:  http://www.fororeptiles.com
Logged Offline
Private Message Private message Reply: 4 - 10
Martin
May 25, 2007, 7:15am Report to Moderator Report to Moderator

I love E-Blah
10 Series Support Team
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
Logged Offline
Site Site Private Message Private message Reply: 5 - 10
nahual
May 26, 2007, 12:08am Report to Moderator Report to Moderator

E-Blah Member
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>


Luis Larios
forum:  http://www.fororeptiles.com
Logged Offline
Private Message Private message Reply: 6 - 10
Martin
May 26, 2007, 4:35am Report to Moderator Report to Moderator

I love E-Blah
10 Series Support Team
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
Logged Offline
Site Site Private Message Private message Reply: 7 - 10
nahual
May 29, 2007, 2:21am Report to Moderator Report to Moderator

E-Blah Member
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...


Luis Larios
forum:  http://www.fororeptiles.com
Logged Offline
Private Message Private message Reply: 8 - 10
Martin
May 30, 2007, 2:45am Report to Moderator Report to Moderator

I love E-Blah
10 Series Support Team
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
Logged Offline
Site Site Private Message Private message Reply: 9 - 10
nahual
May 31, 2007, 11:56am Report to Moderator Report to Moderator

E-Blah Member
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.


Luis Larios
forum:  http://www.fororeptiles.com
Logged Offline
Private Message Private message Reply: 10 - 10
1 Pages 1 Recommend Thread
Print

E-Blah Community    Modifications    Mod Requests and Support  ›  Upload resize