Hi, this is Andy again.

It's about that, after I installed the ASP patch, all
other *.asp are working but the index.html is not
which claim that it couldn't find glocal.asa

The .htaccess file I used is from your example folder,
which is :

------------------------------------
# Note this file was used for Apache 1.3.0
# Please see the readme, for what exactly the config
variables do.

PerlSetVar Global  .            
PerlSetVar GlobalPackage Apache::ASP::Demo
PerlSetVar StateDir  /tmp/asp_demo
PerlSetVar StatINC 0
PerlSetVar StatINCMatch 0
PerlSetVar Clean 0
PerlSetVar DynamicIncludes 1
PerlSetVar FileUploadMax 25000
PerlSetVar FileUploadTemp 1
PerlSetVar SessionQueryParse 0
PerlSetVar SessionQuery 1
PerlSetVar Debug -2
PerlSetVar StateCache 0

# .asp files for Session state enabled
<Files ~ (\.asp)>
        SetHandler perl-script
        PerlHandler Apache::ASP
        PerlSetVar CookiePath  /        
        PerlSetVar SessionTimeout  .5
#       PerlSetVar StateSerializer Storable
#       PerlSetVar StateDB DB_File
#       PerlSetVar StatScripts 0
</Files>

# .htm files for the ASP parsing, but not the $Session
object
# NoState turns off $Session & $Application
<Files ~ (\.htm)>
        SetHandler perl-script
        PerlHandler Apache::ASP
        PerlSetVar NoState 1 
        PerlSetVar BufferingOn 1
        PerlSetVar NoCache 1
        PerlSetVar DebugBufferLength 250
</Files>

<Files ~ (\.inc|\.htaccess)>
        ForceType text/plain
</Files>

# .ssi for full ssi support, with Apache::Filter
<Files ~ (\.ssi)>
        SetHandler perl-script
        PerlHandler Apache::ASP Apache::SSI
        PerlSetVar Global .
        PerlSetVar Filter On
        PerlSetVar NoCache 1
</Files>

<Files ~ (session_query_parse.asp$)>
        SetHandler perl-script
        PerlHandler Apache::ASP
        PerlSetVar CookiePath  /        
        PerlSetVar SessionTimeout  1
        PerlSetVar SessionQueryParseMatch
^http://localhost
</Files>
---------------------------------

the folder I put my asp example files is
/data/home/asp/eg

And here is the error message I get.

-----------------------------------
Errors Output

> %EG is not defined, make sure you copied
./eg/global.asa correctly at (eval 12) line 5.
, /usr/lib/perl5/site_perl/5.005/Apache/ASP.pm line
1229

Debug Output

> RUN ASP (v0.18) for /data/home/asp/eg/index.html
> GlobalASA package Apache::ASP::Demo
> ASP object created - GlobalASA:
Apache::ASP::GlobalASA=HASH(0x83c5370); Request:
Apache::ASP::Request=HASH(0x83947d0); Response:
Apache::ASP::Response=HASH(0x83946d4); Server:
Apache::ASP::Server=HASH(0x83945a8); basename:
index.html; compile_includes: 1; dbg: 2;
debugs_output: ARRAY(0x82834c0); filename:
/data/home/asp/eg/index.html; global: /tmp;
global_package: Apache::ASP::Demo; id: NoCache;
includes_dir: ; init_packages: ARRAY(0x8302fe4);
no_cache: 1; no_state: 1; package: Apache::ASP::Demo;
pod_comments: 1; r: Apache=SCALAR(0x840ca70);
sig_warn: ; stat_inc: ; stat_inc_match: ;
stat_scripts: 1; unique_packages: ; use_strict: ; 
> parsing index.html
> runtime exec of dynamic include header.inc args ()
> parsing header.inc
> undefing sub Apache::ASP::Demo::_tmp_header_inc code
CODE(0x840ff20)
> compile include header.inc sub _tmp_header_inc
> runtime exec of dynamic include footer.inc args ()
> parsing footer.inc
> already failed to load Apache::Symbol
> undefing sub Apache::ASP::Demo::_tmp_footer_inc code
CODE(0x842b6a0)
> compile include footer.inc sub _tmp_footer_inc
> already failed to load Apache::Symbol
> undefing sub Apache::ASP::Demo::NoCache code
CODE(0x842b6b8)
> compiling into package Apache::ASP::Demo subid
Apache::ASP::Demo::NoCache
> executing NoCache
> %EG is not defined, make sure you copied
./eg/global.asa correctly at (eval 12) line 5.
, /usr/lib/perl5/site_perl/5.005/Apache/ASP.pm line
1229

ASP to Perl Program

  1: package Apache::ASP::Demo; ;; sub
Apache::ASP::Demo::NoCache {  ;;  return(1) unless
$_[0];  ;; no strict;;use vars qw($Application
$Session $Response $Server $Request);;
  2: # split the page in 2 for nice formatting and
english style sorting
  3: my(@col1, @col2);
  4: my @keys = sort keys %EG;
  5: @keys || die("\%EG is not defined, make sure you
copied ./eg/global.asa correctly");
  6: my $half = int(@keys/2);
  7: 
  8: for(my $i =0; $i <= $#keys; $i++) {
  9:    if($i < $half) {
 10:            push(@col1, $keys[$i]);
 11:    } else {
 12:            push(@col2, $keys[$i]);
 13:    }
 14: } 
 15: $Response->Debug(\@col1, \@col2);
 16: $title = 'Example ASP Scripts';
 17: $Response->Write('
 18: 
 19: '); $Response->Include('header.inc', );
$Response->Write('
 20: 
 21: <table border=0>
 22: '); while(@col1) { 
 23:    my $col1 = shift @col1;
 24:    my $col2 = shift @col2;
 25:    $Response->Write('
 26:    <tr>
 27:    '); for([$col1, $EG{$col1}], '', [$col2,
$EG{$col2}]) { 
 28:            unless(ref $_) { 
 29:                    print "<td
width=10>&nbsp;</td>";
 30:                    next;
 31:            } 
 32:            next unless $_->[0]; # last col / last
row
 33: 
 34:            # clean up the descriptions
 35:            $_->[1] =~ s/\s*\.\s*$//s;
 36:            $_->[1] .= '.';
 37: 
 38:            $Response->Write('
 39:            <td valign=top>
 40:                    <nobr>
 41:                    <font size=-0>
 42:                            <tt><b>
 43:                            <a
href='.($_->[0]).'>'.($_->[0]).'</a>
 44:                            '); if($_->[0] =~
/\.(htm|asp|ssi)$/) { $Response->Write('
 45:                                    &nbsp
 46:                                    <i>
 47:                                    (<a
href=source.asp?file='.($_->[0]).'>source</a>)
 48:                                    </i>
 49:                            '); }
$Response->Write('
 50:                            </tt></b>
 51:                    </font>
 52:                    </nobr>
 53:                    <br>
 54:                    <font
size=-1>'.($_->[1]).'</font>                      
 55:            </td> 
 56:    '); } $Response->Write('
 57:    </tr>
 58: '); } $Response->Write('
 59: </table>
 60: 
 61: '); $Response->Include('footer.inc', );  ;; }

-------------------------------------------

Thank you.

Andy

__________________________________________________
Do You Yahoo!?
Send online invitations with Yahoo! Invites.
http://invites.yahoo.com

Reply via email to