You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Stefano Triolo <in...@deep.co.uk> on 2000/10/02 12:55:24 UTC

Apache::ASP

I realy do not understand where is the problem!
I attach the output that my internal server return when I try to execute these few lines:

<html>
    <head>
    <title>My First ASP script</title>
    </head>

    <body>
        <font face="arial" size=4>
<%
    response.write "Hello, ASP World!"
%>
        </font>
    </body>
</html>

Please answer me to stegu@tin.it 


Errors Output

syntax error at (eval 14) line 41, near ""Hello, ASP World!"
## END ##

$main::Response"
, /usr/lib/perl5/site_perl/5.005/Apache/ASP.pm line 818

Debug Output

STARTING ASP HANDLER (v0.09) for file /home/httpd/html/asp/first.asp
GlobalASA package Apache::ASP::Compiles::_tmp_global_asa
created $Application - 
SessionCookie - 6938529594b0bcf467de98c45b78ed4e
new session state Apache::ASP::State=HASH(0x3c2e00)
session not expired - time: 970480092; timeout: 970481261; 
tieing session - 
ASP object created - Application: Apache::ASP::Application=HASH(0x1b78ec); GlobalASA: Apache::ASP::GlobalASA=HASH(0x1b7874); Internal: Apache::ASP::State=HASH(0x34912c); Request: Apache::ASP::Request=HASH(0x1b782c); Response: Apache::ASP::Response=HASH(0x2bb9dc); Server: Apache::ASP::Server=HASH(0x1b7bc8); Session: Apache::ASP::Session=HASH(0x349234); app_start: 0; basename: first.asp; buffering_on: 1; cgi_do_self: 0; command_line: ; compile_error: ; compile_includes: ; cookie_path: /; debug: 2; debugs_output: ARRAY(0x3c2da0); dirname: /home/httpd/html/asp; errors: 0; errors_output: ARRAY(0x2c586c); filehandle: ; filename: /home/httpd/html/asp/first.asp; filter: 0; global: /tmp; group_refresh: 120; groups_refresh: 120; id: _home_httpd_html_asp_first_asp____INLINE; mtime: 970480089; no_cache: ; no_headers: 0; no_session: ; no_state: 0; pod_comments: 1; r: Apache=SCALAR(0x1acf54); remote_ip: 192.168.1.111; secure_session: ; session_serialize: 0; session_timeout: 1200; soft_redirect: 0; stat_inc: 1; state_db: SDBM_File; state_dir: ./.state; state_manager: 10; 
compiling - package: _home_httpd_html_asp_first_asp____INLINE; 
syntax error at (eval 14) line 41, near ""Hello, ASP World!"
## END ##

$main::Response"
, /usr/lib/perl5/site_perl/5.005/Apache/ASP.pm line 818

Compile Error


syntax error at (eval 14) line 41, near ""Hello, ASP World!"
## END ##

$main::Response"


ASP to Perl Program

  1: package Apache::ASP::Compiles::_home_httpd_html_asp_first_asp____INLINE;
  2: no strict;
  3: use vars qw($Application $Session $Response $Server $Request);
  4: 
  5: # allow developers to place modules in global directory
  6: use lib qw(/tmp);
  7: 
  8: # aliases here 
  9: sub exit { $main::Response->End(); } 
 10: 
 11: # handler gets called from ASP perl handler to run code 
 12: sub handler { 
 13:   my($self, $routine) = @_; 
 14: 
 15:   if($routine && ($routine ne "handler")) { 
 16:     return &$routine; 
 17:   } 
 18:   $self = $routine = undef; 
 19:   @_ = (); 
 20: 
 21: #######################################################
 22: ## Your ASP script has been parsed and inserted here !! 
 23: #######################################################
 24: 
 25: 
 26: $main::Response->Write(
 27: '<html>
 28:     <head>
 29:     <title>My First ASP script</title>
 30:     </head>
 31: 
 32:     <body>
 33:         <font face="arial" size=4>
 34: '
 35: );
 36: 
 37: ## CODE BEGIN ##
 38:     response.write "Hello, ASP World!"
 39: ## END ##
 40: 
 41: $main::Response->Write(
 42: '        </font>
 43:     </body>
 44: </html>
 45: '
 46: );
 47: 
 48: 
 49: #######################################################
 50: ## End script insert
 51: #######################################################
 52: 
 53:   $main::Response->End(); 
 54: }
 55: 1;


Re: Apache::ASP

Posted by Carlos Ramirez <ra...@roses.bna.boeing.com>.


Stefano Triolo wrote:

> I realy do not understand where is the problem!I attach the output
> that my internal server return when I try to execute these few lines:
> <html>
>     <head>
>     <title>My First ASP script</title>
>     </head>     <body>
>         <font face="arial" size=4>
> <%
>     response.write "Hello, ASP World!"

This should be $Response->Write("Hello ASP World");

Or better yet, you can use the shortcut method <%=$var%> like so:

<% my $hello_string  = "Hello ASP World"; %> ## <% ...%> evaluates perl
code

<%=$hello_string%>  <%=..%> prints stuff to browser



>
> %>
>         </font>
>     </body>
> </html> Please answer me to stegu@tin.it  Errors Output
>
> syntax error at (eval 14) line 41, near ""Hello, ASP World!"
> ## END ##
>
> $main::Response"
> , /usr/lib/perl5/site_perl/5.005/Apache/ASP.pm line 818
>
> Debug Output
>
> STARTING ASP HANDLER (v0.09) for file /home/httpd/html/asp/first.asp
> GlobalASA package Apache::ASP::Compiles::_tmp_global_asa
> created $Application -
> SessionCookie - 6938529594b0bcf467de98c45b78ed4e
> new session state Apache::ASP::State=HASH(0x3c2e00)
> session not expired - time: 970480092; timeout: 970481261;
> tieing session -
> ASP object created - Application:
> Apache::ASP::Application=HASH(0x1b78ec); GlobalASA:
> Apache::ASP::GlobalASA=HASH(0x1b7874); Internal:
> Apache::ASP::State=HASH(0x34912c); Request:
> Apache::ASP::Request=HASH(0x1b782c); Response:
> Apache::ASP::Response=HASH(0x2bb9dc); Server:
> Apache::ASP::Server=HASH(0x1b7bc8); Session:
> Apache::ASP::Session=HASH(0x349234); app_start: 0; basename:
> first.asp; buffering_on: 1; cgi_do_self: 0; command_line: ;
> compile_error: ; compile_includes: ; cookie_path: /; debug: 2;
> debugs_output: ARRAY(0x3c2da0); dirname: /home/httpd/html/asp; errors:
> 0; errors_output: ARRAY(0x2c586c); filehandle: ; filename:
> /home/httpd/html/asp/first.asp; filter: 0; global: /tmp;
> group_refresh: 120; groups_refresh: 120; id:
> _home_httpd_html_asp_first_asp____INLINE; mtime: 970480089; no_cache:
> ; no_headers: 0; no_session: ; no_state: 0; pod_comments: 1; r:
> Apache=SCALAR(0x1acf54); remote_ip: 192.168.1.111; secure_session: ;
> session_serialize: 0; session_timeout: 1200; soft_redirect: 0;
> stat_inc: 1; state_db: SDBM_File; state_dir: ./.state; state_manager:
> 10;
> compiling - package: _home_httpd_html_asp_first_asp____INLINE;
> syntax error at (eval 14) line 41, near ""Hello, ASP World!"
> ## END ##
>
> $main::Response"
> , /usr/lib/perl5/site_perl/5.005/Apache/ASP.pm line 818
>
> Compile Error
>
>
> syntax error at (eval 14) line 41, near ""Hello, ASP World!"
> ## END ##
>
> $main::Response"
>
>
> ASP to Perl Program
>
>   1: package
> Apache::ASP::Compiles::_home_httpd_html_asp_first_asp____INLINE;
>   2: no strict;
>   3: use vars qw($Application $Session $Response $Server $Request);
>   4:
>   5: # allow developers to place modules in global directory
>   6: use lib qw(/tmp);
>   7:
>   8: # aliases here
>   9: sub exit { $main::Response->End(); }
> 10:
> 11: # handler gets called from ASP perl handler to run code
> 12: sub handler {
> 13:   my($self, $routine) = @_;
> 14:
> 15:   if($routine && ($routine ne "handler")) {
> 16:     return &$routine;
> 17:   }
> 18:   $self = $routine = undef;
> 19:   @_ = ();
> 20:
> 21: #######################################################
> 22: ## Your ASP script has been parsed and inserted here !!
> 23: #######################################################
> 24:
> 25:
> 26: $main::Response->Write(
> 27: '<html>
> 28:     <head>
> 29:     <title>My First ASP script</title>
> 30:     </head>
> 31:
> 32:     <body>
> 33:         <font face="arial" size=4>
> 34: '
> 35: );
> 36:
> 37: ## CODE BEGIN ##
> 38:     response.write "Hello, ASP World!"
> 39: ## END ##
> 40:
> 41: $main::Response->Write(
> 42: '        </font>
> 43:     </body>
> 44: </html>
> 45: '
> 46: );
> 47:
> 48:
> 49: #######################################################
> 50: ## End script insert
> 51: #######################################################
> 52:
> 53:   $main::Response->End();
> 54: }
> 55: 1;

--
-----------------------------------------------------------------------
Carlos Ramirez + Boeing + Reusable Space Systems + 714.372.4181
-----------------------------------------------------------------------
- Someday I'll find that peer and reset his connection!