in reply to Re^4: Image magic creation of thumb fail
in thread Image magic creation of thumb fail

>
Have \xampp\perl\lib Want \strawb~1\perl\lib Your perl and your Config.pm seem to have different ideas about the architecture they are running on.

Looks like you are messing around with two different Perl installations, which would also explain why the modules aren't found.

Cheers Rolf
(addicted to the 𐍀𐌴𐍂𐌻 Programming Language :)
Wikisyntax for the Monastery

Replies are listed 'Best First'.
Re^6: Image magic creation of thumb fail
by *alexandre* (Scribe) on Jan 08, 2023 at 00:02 UTC
    Yes I see it now, I updated the PATH within C:\Strawb~1\c\bin;%PATH% and PERL_HOME to point to C:\Strawberry\perl\bin but I still have conflict between two version of perl. Awesome I run my program within the correct bin path and it's worked again thank you. EDIT The script run well within command line but I got an exception while I'm been running it as a CGI script
    #!C:/Strawberry/perl/bin/perl.exe -w use warnings; use Image::Thumbnail; use CGI; use CGI::Cookie; use Time::HiRes qw(gettimeofday); use CGI::Lite (); my $query = CGI->new ; $imgdir= "C:/Users/41786/OneDrive/Documents/recordz1/upload"; #my $t = new Image::Thumbnail( # module => 'Imager', # size => 55, # create => 1, # input => "$imgdir/282.jpg", # outputpath => "$imgdir/test.jpg", #); # With Image Magick my $file = $query->param("image"); print "Content-Type: text/html\n\n"; my $t = new Image::Thumbnail( size => "55x75", create => 1, module => "Image::Magick", input => "$imgdir/282.jpg", outputpath => "$imgdir/test2.jpg"); print "test";
    Leave me and exception within Magick.xs.dll is not loaded.
      Now everyhings works well here is simple full cript
      #!C:/Strawberry/perl/bin/perl.exe -w use warnings; use Image::Thumbnail; use CGI; use Image::Magick; my $query = CGI->new ; $imgdir= "C:/Users/41786/OneDrive/Documents/recordz1/upload"; # With Image Magick my $file = $query->param("image"); uploadImage("1.jpg"); sub uploadImage { my $name = shift || ''; my $file = $query->param('image'); open(LOCAL, ">$imgdir/$name") or print 'error'; my $file_handle = $query->upload('image'); + binmode LOCAL; while(<$file_handle>) { print LOCAL; } close($file_handle); close(LOCAL); $t = new Image::Thumbnail( size => "55x75", create => 1, module => "Image::Magick", input => "$imgdir/$file", outputpath => "$imgdir/thumb.$name.jpg"); }