perl catalog program not uploading files

Discussion in 'General Web Coding' started by stampee, May 29, 2007.

  1. stampee

    stampee Guppy

    Hi all: I use an old Perl program called Shopping cart for my customers. Designed by Intralinks corp. Version 3. It has been around for years and was used widely by companies. I can no longer find a forum or suppoert for this program. Since I became a member of Jodohost, The program will no longer upload full size images to the catalog. It works fine when it uploads the thumbnail images however. I am not a perl programmer, but I believe the problem is in the upload routine which I will paste below.
    My guess is that the IF ELSE function is not working properly. I do not think the code is incrementing the variable ONNUM
    Maybe Jodohost uses a newer version of perl that this program does not like?
    Any help would be greatly appreciated.
    $onnum = 1;

    # do the uploading
    while ($onnum != 3) {
    if($onnum == 1) {$photon=$thumbnail;} else {$photon=$photoname;}
    my $req = new CGI;
    my $file = $req->param("FILE$onnum");
    if ($file ne "") {
    my $fileName = $file;
    $fileName =~ s!^.*(\\|\/)!!;
    $newmain = $fileName;
    if ($allowall ne "yes") {
    if (lc(substr($newmain,length($newmain) - 4,4)) ne $theext){
    $filenotgood = "yes";
    if ($filenotgood ne "yes") {
    open (OUTFILE, ">$photo_folder/$photon");
    binmode OUTFILE;
    #print "$photo_folder/$photoname<br>";
    while (my $bytesread = read($file, my $buffer, 1024)) {
    print OUTFILE $buffer;
    close (OUTFILE);

Share This Page

JodoHost - 26,000 hosting end-users in 100 countries
Plesk Web Hosting
VPS Hosting
H-Sphere Web Hosting
Other Services