Gossamer Forum
Home : General : Perl Programming :

problem with uploading files - urgent help needed

Quote Reply
problem with uploading files - urgent help needed
hi everybody i am a newby to perl, i am hosting a little portal that offers 10Mb webhosting. I am using a perl script for registering, auth, and managing personal folders and files. Everything' s ok until one wants to upload images or zips or some other files that are not txt heml ini and log.
You can try see what i mean by going to :
http://keropinet.dyndns.org/cgi-bin/account/signup.cgi
and after signing up go to:
http://keropinet.dyndns.org/cgi-bin/account/manager.cgi

then try to upload an image or something...

the code portion that handles the upload is the following, i cannot say if there is something wrong in there...
# Upload file(s)
if ($in{'upload'}) {
for ($i=1; $i<=5; $i++) {
if ($in{"file$i"}) {
if ($cgi_cfn{"file$i"} =~ /(.*)\/(.*)/) { $cgi_cfn{"file$i"}=$2; }
if ($cgi_cfn{"file$i"} =~ /(.*)\\(.*)/) { $cgi_cfn{"file$i"}=$2; }

foreach $line (@bad_types) { if ($cgi_cfn{"file$i"} =~ /$line/) { &error_html("Invaild file type: $line"); } }
$limit=$available;
if (-f "$config{'root_dir'}/$in{'username'}/$cgi_cfn{\"file$i\"}") {
@stat=stat("$config{'root_dir'}/$in{'username'}/$cgi_cfn{\"file$i\"}");
$limit += ($stat[7] * .001);
}
if (($limit - (length($in{"file$i"}) * .001)) < 0) { &error_html("Spazio web esaurito"); }
open (FILE,">$config{'root_dir'}/$in{'username'}/$cgi_cfn{\"file$i\"}") || &error_html("Impossibile creare $cgi_cfn{\"file$i\"}: $!");
binmode (FILE);
print FILE $in{"file$i"};
close (FILE);
}
}

I forgot to say... when i try to upload images, the browser stands by in 'sending connection to host....'
and nothing happens
<img src="http://keropinet.dyndns.org/knlogo_002.jpg">
<br> <b>keropiNET</b> servizi online
Quote Reply
Re: [keropinet] problem with uploading files - urgent help needed In reply to
Hi,

See the attached. I hope it helps

Cheers,

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] problem with uploading files - urgent help needed In reply to
ehm tandat there was nothing attacherd :-\
<img src="http://keropinet.dyndns.org/knlogo_002.jpg">
<br> <b>keropiNET</b> servizi online
Quote Reply
Re: [keropinet] problem with uploading files - urgent help needed In reply to
Sorry, here it is.

Cheers,

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] problem with uploading files - urgent help needed In reply to
nothing changed, i tried to upload images o zips but nothing changes... the connction remains on 'sending request...'

see for yourself at :
http://keropinet.dyndns.org/cgi-bin/account/manager2.cgi

login: ildiavolo74
pass: diablo