Gossamer Forum
Home : General : Perl Programming :

Cgi ...Perl...or win98

Quote Reply
Cgi ...Perl...or win98
Im kinda a rookie, in fact this is my first post. dbman up and running ...3 dif databases
on win98, active perl & MS personal webserver
I have installed JP Deni`s file or "image" upload mod. it seems it works fine except after I upload a gif or a jpeg it has a prob. showing the image. it puts it in the right folder witch I named pics, it is outside of the cgi-bin. The file on my script shows an x where the image is spose to be ....the pics folder has the image in it...it has the right icon...but even when I click on it from windows explorer it tries to open then it jus shows an x...I can move other images into the pics folder and click on them ..jus fine ...I am not sure where this prob is ...win, perl, or dbman, or the mod. any info on this would be great... I looked all over the board ...but could not find a fix...Thanx JUMBO



[This message has been edited by Jumbo (edited February 23, 2000).]
Quote Reply
Re: Cgi ...Perl...or win98 In reply to
When you are writing the file, the filehandle is probably not set to binmode, which it needs to be when writing binary files from an upload, on Windows.

--mark
Quote Reply
Re: Cgi ...Perl...or win98 In reply to
Yep that was the prob ...I found the fix for it on the board...Thanx for telling me where to start debugging..lol... hear is the fix so if someone els needs it.

"Jp Deni`s" file upload mod ...fix to make binary output. for "File-upload.cgi"
look for these files about halfway throgh the script insert the line maked below..
This fix is a copy from a post of
D PETERSEN.....thanx guy..!



file_upload.cgi:
print "existing file is.....
print "The Error message below....
print "the problem.\n\n";
print "Error: $!\n";
exit;
}
binmode (OUTFILE); #<-- Add this Line ###
undef $BytesRead;
undef $Buffer;









[This message has been edited by Jumbo (edited February 23, 2000).]
Quote Reply
Re: Cgi ...Perl...or win98 In reply to
BTW: It is JPDeni NOT Jd penny.

Wink

Regards,

------------------
Eliot Lee....
Former Handle: Eliot
* Check Resource Center
* Search Forums
Quote Reply
Re: Cgi ...Perl...or win98 In reply to
Sorry....for the spelling.....I ment ..

JP Deni`s upload mod...
sorry..