I am using perlscript in an asp page that was working fine on one box for a
couple months and I moved it to another.  Now after running for several
hours I get the error (below) on this page which makes no sense.  Nothing
changes if I bounce IIS but if I reboot the box, everything is fine for a
few hours after which it comes back.


"PerlScript Error error '80004005'

Can't locate XSLoader.pm in @INC (@INC contains: C:/Perl/lib
C:/Perl/site/lib .) at C:/Perl/lib/IO.pm line 5. BEGIN failed--compilation
aborted at C:/Perl/lib/IO.pm line 5. Compilation failed in require at
C:/Perl/lib/IO/Handle.pm line 256. BEGIN failed--compilation aborted at
C:/Perl/lib/IO/Handle.pm line 256. Compilation failed in require at
C:/Perl/lib/IO/Seekable.pm line 101. BEGIN failed--compilation aborted at
C:/Perl/lib/IO/Seekable.pm line 101. Compilation failed in require at
C:/Perl/lib/IO/File.pm line 112. BEGIN failed--compilation aborted at
C:/Perl/lib/IO/File.pm line 112. Compilation failed in require at
C:/Perl/lib/FileHandle.pm line 9. Compilation failed in require at (eval 2)
line 7. BEGIN failed--compilation aborted (in cleanup) Can't locate
XSLoader.pm in @INC (@INC contains: C:/Perl/lib C:/Perl/site/lib .) at
C:/Perl/lib/IO.pm line 5. BEGIN failed--compilation aborted at
C:/Perl/lib/IO.pm line 5. Compilation failed in require at
C:/Perl/lib/IO/Handle.pm line 256. BEGIN failed--compilation aborted at
C:/Perl/lib/IO/Handle.pm line 256. Compilation failed in require at
C:/Perl/lib/IO/Seekable.pm line 101. BEGIN failed--compilation aborted at
C:/Perl/lib/IO/Seekable.pm line 101. Compilation failed in require at
C:/Perl/lib/IO/File.pm line 112. BEGIN failed--compilation aborted at
C:/Perl/lib/IO/File.pm line 112. Compilation failed in require at
C:/Perl/lib/FileHandle.pm line 9. Compilation failed in require at (eval 2)
line 7. BEGIN failed--compilation aborted "

This does make sense as from the command line I can run `perl -e "use
XSLoader"` and it returns fine.  Also XSLoader.pm is in c:\perl\lib which is
in the @INC path it says it can't find.  This is an intermittent problem.
The script itself is below.  Any help would be greatly appreciated as I am
in trouble with this!


<script language=PerlScript RUNAT=Server>
sub fifth {

$session = shift;

$querystr = shift;

#$Response->write("IN SUBROUTINE and user is $session<br>");
#$Response->write("IN SUBROUTINE and querystr is $querystr<br><br>");
$| = 1;                                                 # flush on!
use FileHandle;                                         # for includes
use LWP::Simple;                                        # getting a url
use CGI;

# Init some vars.
#
my($contact1) = '[EMAIL PROTECTED]';
my($doc_root) = 'd:/Inetpub';
my($inc_root) = $doc_root . '/toolkit/includes';
my($search_base_url) = 'http://localhost:8765';
my($search_index_url) = $search_base_url . '/index.html';
my($search_query_url) = $search_base_url . '/query.html';


my(%cgi, @cgi_names);
cgi_decode_input(\%cgi, \@cgi_names);


 my($cgi_dir) = 'search';




#---------------------------------------
# Game on - dispatch on command.
#
my($cmd) = $cgi{'cmd'};
$cmd = 'query' if (! $cmd);
if    ($cmd eq 'query')         { cmd_query($session,$querystr); }
else                            { cmd_error(); }

# Game over.
exit(0);


#** functions
****************************************************************

#
# cmd_query - output the results of an inktomi search query.
#
sub cmd_query
{
    #my($qs) = $ENV{QUERY_STRING};
    my($user) = shift;
    my($qs) = shift;
#    if ($qs eq "") {
#        $qs = "col=technote&charset=iso-8859-1";
#    }


    my($url) = $qs? $search_query_url . '?' . $qs : $search_index_url;

    if ($user == 1) {
        if (! $qs) { $url .= "?";}
        $url .= "&iw=1";
    }

  # $Response->write("\$url is $url<br>");
    my(@info) = get($url);

    output_http_start();
    $Response->write(@info);

}


#
# cmd_error - oops.
#
sub cmd_error
{
    oops('Unknown command: ' . $cmd);
}


#-- support: reply
ops -------------------------------------------------------
#---------------------------------------------------------------------------
--
#
# oops - output an error and stop.
#
sub oops
{
    my($msg) = @_;

    output_http_start();
    $Response->write("<br><br>\n");
    $Response->write("<font color=red><b>ERROR:</b></font> %s<br><br>\n,
$msg");
    $Response->write("Please contact <a
href=mailto:$contact1>$contact1</a>");
    $Response->write("to report this problem.<br><br>\n");
    exit(1);
}


# output_http_start - kick out the http header.
#
sub output_http_start
{
    my($type) = @_;

    $type = 'text/html' if (! $type);
    $Response->{ContentType} = "$type";
}


#-- support: misc
utils ------------------------------------------------------
#---------------------------------------------------------------------------
--
#
# cgi_decode_input - grok the name/value's out of the cgi request.
#
sub cgi_decode_input
{
    my($param, $order) = @_;
    my($i, $loc, $key, $val, $param_str);

    # Bootstrap if no values.
    if (! $param) { $param = { }; }
    if (! $order) { $order = [ ]; }

    # Read in text
    if ($ENV{'REQUEST_METHOD'} eq "POST") {
        my($len) = $ENV{CONTENT_LENGTH};
        for ($i=0; $i<$len; $i++) { $param_str .= getc; }
    }
    else {
        # default to GET
        $param_str = $ENV{'QUERY_STRING'};
    }

    my(@pairs) = split(/&/, $param_str);

    foreach $i (0 .. $#pairs) {
        # Convert plus's to spaces
        $pairs[$i] =~ s/\+/ /g;

        # Convert %XX from hex numbers to alphanumeric
        $pairs[$i] =~ s/%(..)/pack("c",hex($1))/ge;

        # Split into key and value.
        $loc = index($pairs[$i], "=");
        $key = substr($pairs[$i], 0, $loc);
        $val = substr($pairs[$i], $loc + 1);
        # \0 is the multi-value separator
        $param->{$key} .= '\0' if (defined($param->{$key}));
        $param->{$key} .= $val;
        push(@$order, $key);
    }

    return ($param, $order);
}
}
</script>
_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to