#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    0
    Rep Power
    0
    I am trying to run a perl script, and when I try to load it in my webbrowser, I get this error:

    Internal Server Error

    The server encountered an internal error or misconfiguration and was unable to complete your request.

    I also tryed to run the debugger:

    perl -c index.pl

    The results were:

    /<(?:[^>'"]*|(['"]).*?1)*>/: regexp *+ operand could be empty at index.pl line 100.

    Line 100 of my script looks like this:

    $sbody =~ s/<(?:[^>'"]*|(['"]).*?1)*>//gs;

    This comes from this section of the script:

    # Basic Modules

    $http = Http->new();
    $http->add($http->content_type("text/html"));
    $content = Content->new();
    $macro = Macro->new();
    $style = Style->new();
    $user = User->new();
    $settings = Settings->new();
    $settings->readsettings();
    $sitemap = Sitemap->new();
    $search= Content->new();
    $stats = Stats->new();
    $image = Image->new();
    $article = Article->new();
    $button = Button->new();
    $link = Link->new();
    $user = User->new();

    $file = File->new();

    if ($FORM{page} eq "") { $FORM{page} = $settings->main; }
    $content->file($FORM{page});

    @pairs = split(/ /,$http->getcookie);
    foreach $pair (@pairs)
    { ($name, $value) = split(/=/, $pair);
    $value =~ tr/+/ /;
    $value =~ s/%([a-fA-F0-9][a-fA-F0-9])/pack("C", hex($1))/eg;
    $COOKIE{$name} = $value;
    }
    if ($content->access ne $COOKIE{GROUP} && $content->access ne "")
    { $content->file("login"); }
    $http->add($http->pragma);
    print $http->header;
    if ($content->style ne undef)
    { $style->file($content->style); }
    if ($content->macro ne undef)
    { $macro->file($content->macro); }

    $FORM{query} =~ s/^s+//g;
    $FORM{query} =~ s/s+$//g;
    $FORM{query}= "Q$FORM{query}";
    if ($FORM{query} ne "" && length($FORM{query}) >= 3 )
    { @FILES = $content->list;
    foreach $file (@FILES)
    { $search->file($file);
    if ($search->access eq $COOKIE{GROUP} &#0124; &#0124; $search->access eq "")
    { if ($search->keywords =~ /$FORM{query}/i)
    { $sbody = "";
    foreach $t($search->body) { $sbody .= $t; }
    $sbody =~ s/<(?:[^>'"]*|(['"]).*?1)*>//gs;
    $sbody =~ s/t//g;
    $sbody = substr($sbody,0,250);
    $sbody .= "...";
    push(@Results, sprintf ("<LI><A HREF="index.pl?page=$file">%s</A>n<BR><FONT SIZE="1">$sbody</FONT>",$search->title)); }
    }
    }
    if (@Results == 0 && length($FORM{query}) >= 3) { push(@Results,"No Results !"); }
    }
    if(length($FORM{query}) < 3) { push(@Results,"Query too short !"); }
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Oct 2000
    Posts
    17
    Rep Power
    0
    Try running it through perl -w for a bit more info

IMN logo majestic logo threadwatch logo seochat tools logo