Apache-ASP (.htaccess)

Permite rodar arquivos .asp no Apache.

Categoria: Apache

Software: Apache-ASP

[ Hits: 28.518 ]

Por: Fábio Berbert de Paula


Este arquivo faz com que o módulo Apache-ASP seja associado aos arquivos de extensão .asp. Este é o exemplo padrão que vem distribuído junto ao pacote do módulo.


# 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 50000
PerlSetVar FileUploadTemp 1
PerlSetVar SessionQueryParse 0
PerlSetVar SessionQuery 1
#PerlSetVar Debug 2
PerlSetVar Debug -3
PerlSetVar StateCache 0
PerlSetVar SessionCount 1
PerlSetVar TimeHiRes 1
PerlSetVar CompressGzip 0
PerlSetVar UseStrict 1
#PerlSetVar CacheDB DB_File
PerlSetVar CacheDB MLDBM::Sync::SDBM_File

# .asp files for Session state enabled
<Files ~ (\.asp)>
   SetHandler perl-script
   PerlHandler Apache::ASP
   PerlSetVar CookiePath  /   
   PerlSetVar SessionTimeout  5
   PerlSetVar RegisterIncludes 1
   PerlSetVar XMLSubsMatch my:\w+
   PerlSetVar AllowApplicationState 1
   PerlSetVar AllowSessionState 1
#   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 ~ (\.xml)>
   SetHandler perl-script
   PerlHandler Apache::ASP
   PerlSetVar NoState 1 
   PerlSetVar XSLT template.xsl
   PerlSetVar XSLTCache 1
</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
</Files>

<Files ~ (\filter.filter)>
       SetHandler perl-script
       PerlHandler Apache::ASP Apache::ASP
       PerlSetVar Global .
       PerlSetVar Filter On
</Files>

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

<Files ~ (xml_subs_strict\.asp)>
   SetHandler perl-script
   PerlHandler Apache::ASP
   PerlSetVar CookiePath  /   
   PerlSetVar SessionTimeout  5
   PerlSetVar RegisterIncludes 1
   PerlSetVar XMLSubsMatch my:\w+
   PerlSetVar XMLSubsStrict 1
</Files>
  


Comentários
[1] Comentário enviado por removido em 21/03/2006 - 15:21h

Eu tenho que criar este arquivo ou ele ja esta em algum lugar???

[2] Comentário enviado por luiscarlos em 02/12/2006 - 16:01h

Para rodar um simples for ele vai na boa, mas pra rodar o exemplo que vem junto ao pacote, veja o erro no log do apache




[Sat Dec 02 15:49:00 2006] [error] [asp] [21906] [error] errors compiling global.asa: Can't locate object method "dir_config" via package "Apache" at /var/www/site/apps/bookmarks//./global.asa line 15. <--> at /var/www/site/apps/bookmarks//./global.asa line 15 <--> \teval 'E) || die("can\\'t create table $DBI::errstr"); <--> ; <--> } <--> $Db->do("select * from bookmarks") <--> || die("can\\'t do select against bookmarks: $DBI::errstr"); <--> sub Script_OnStart { <--> $Basename = basename($0); <--> $Title = $Name.\\' / \\'.$Titles{$Basename}; <--> $Response->Include(\\'header.inc\\'); <--> $Form = $Request->Form(); <--> $Query = $Request->QueryString(); <--> $Response->Expires(0); <--> # a user may logout from any script, destroy session, and go <--> # to login / intro page <--> if($Form->{logout}) { <--> \t$Session->Abandon(); <--> \t$Response->Redirect("index.asp?abandon=". <--> \t\t\t ++$Application->{abandon}); <--> } <--> } <--> sub Script_OnEnd { <--> $Response->Include(\\'footer.inc\\'); <--> } <--> sub Application_OnStart { <--> # use max_bookmark_id as a pseudo sequence <--> $Application->Lock(); <--> my $sth = $Db->prepare_cached <--> ("select bookmark_id from bookmarks order by bookmark_id desc"); <--> $sth->execute(); <--> $Application->{max_bookmark_id} = $sth->fetchrow_array(); <--> $Application->UnLock(); <--> } <--> ;; sub exit { $main::Response->End(); } ;; no lib qw(/var/www/site/apps/bookmarks//.); ;; 1;' called at /usr/lib/perl5/site_perl/5.8.6/Apache/ASP/GlobalASA.pm line 124 <--> \tApache::ASP::GlobalASA::new('Apache::ASP=HASH(0x9337a24)') called at /usr/lib/perl5/site_perl/5.8.6/Apache/ASP.pm line 403 <--> \tApache::ASP::new('Apache::ASP', 'Apache2::RequestRec=SCALAR(0x91e1968)', '/var/www/site/apps/bookmarks/index.asp') called at /usr/lib/perl5/site_perl/5.8.6/Apache/ASP.pm line 198 <--> \tApache::ASP::handler('Apache2::RequestRec=SCALAR(0x91e1968)') called at /var/www/site/apps/bookmarks//./global.asa line 0 <--> \teval {...} called at /var/www/site/apps/bookmarks//./global.asa line 0 <--> , /usr/lib/perl5/site_perl/5.8.6/Apache/ASP.pm line 1736
[Sat Dec 02 15:51:11 2006] [error] [client 127.0.0.1] File does not exist: /var/www/perl2, referer: http://lists.openmicroscopy.org.uk/pipermail/ome-users/2006-April/000340.html


[3] Comentário enviado por felipebin em 05/05/2009 - 16:10h

Isto funciona no Apache 2?
Oque tenho que fazer para rodar?

Grato.


Contribuir com comentário

  



Patrocínio

Site hospedado pelo provedor RedeHost.
Linux banner

Destaques

Artigos

Dicas

Tópicos

Top 10 do mês

Scripts