Errror in mod Image::magick or something else?
- From: "Infochannel" <hneuling@xxxxxxxxxxxxxx>
- Date: 29 Oct 2005 04:53:15 -0700
Hi,
I've bought a perl script a few days ago, which will not work at all.
The programmer can't or will not help me in solving the problem. Maybe
somebody here can help me a little, because I'm not experienced with
perl
the problem: The script should load an image (onto another image) which
is temporarily stored until payment is verified. The script starts as
follows:
###################################
#!/usr/bin/perl
use DBI;
use CGI qw/:standard *table start_ul/;
use Image::Magick;
use Image::Info qw(image_info dim);
use Digest::MD5 qw(md5_hex);
use LWP::UserAgent;
foreach(url_param()){param($_,url_param($_))}
require '/www/infochannel.org/thepixelwars.de/admin/payperpixel.conf';
$src = Image::Magick->new;
$back = Image::Magick->new || die "cant create object back";
$time=time();$jscript='';
if (defined param('newpicture') and param('newpicture') ne
''){$time=param('newpicture')}
if (defined param('picture') and param('picture') ne ''){
my $file=upload('picture');
chomp $file;
$newfile="$tmpdir$time";
open (TMP,">$newfile")||die "cant write to $newfile $!";
while (<$file>){print TMP $_}
close(TMP);
my $info = image_info($newfile);
if ($info->{file_media_type} !~ /image/){
$message.=br."Sorry your file does not appear to be an image
file so
could not be used.";
unlink($newfile);
}
else {
param('newpicture',"$time");
}
}
##################
On my server all required modules are installed and working with other
scripts. OS is gentoo linux.
calling the script gives the error message "Sorry your file does not
appear to be an image file so could not be used."
and an empty space instead of the TMP image is shown.
Please see: http://www.thepixelwars.de/maze/index.html
I've seen, that nothing is stored in the tmpdir, so its normal that
image::info gives that error.
I really would appreciate your help in solving the problem. At the
moment I have no more ideas.
p.s. the CHMODS of the tempdir and the image were to store the nefile
in are set to 777.
thanks in advance
Heiner
.
- Follow-Ups:
- Re: Errror in mod Image::magick or something else?
- From: Gunnar Hjalmarsson
- Re: Errror in mod Image::magick or something else?
- Prev by Date: Re: LWP::UserAgent POSTing creates 2 packets - I want just 1
- Next by Date: Re: Help with script to list non-html files in folder
- Previous by thread: Microsoft Access & Win32::Ole
- Next by thread: Re: Errror in mod Image::magick or something else?
- Index(es):
Relevant Pages
|
|