You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Kemin Zhou <ke...@ferring.com> on 2004/03/24 23:22:06 UTC

may be configuration problem

I am new to mod_perl.  Installed the most recent mod_perl
passed nearly all the test.

The most recent Apache

Web server working fine, CGI working fine.  I have used CGI in the past.
No problem.

Now I am switching to mod_perl; with the following configuration in 
httpd.conf

PerlModule Apache2
Alias /perl/  /usr/local/apache2/cgi-bin/
<Location /perl>
        #SetHandler modperl
        SetHandler perl-script
#       PerlInterScope handler # will not work, copied from Apache 2 book
        PerlResponseHandler ModPerl::Registry
        PerlOptions +ParseHeaders
        Options +ExecCGI
</Location>

The only problem is when a simple script

#!/usr/bin/perl -w
#test.pl
print "Content-type: text/html\n\n";
Print "<html><head>....<./head><body> foo bar </body></html>";



When requested from the browser, it  displays the source of my code (the 
literal of the two lines above) not the end result of HTML parsing
(foo bar).
This must be due to a silly error on my part.  Can someone give me a 
starting point?

Kemin



**********************************************************************
Proprietary or confidential information belonging to Ferring Holding SA or to one of its affiliated companies may be contained in the message. If you are not the addressee indicated in this message (or responsible for the delivery of the message to such person), please do not copy or deliver this message to anyone. In such case, please destroy this message and notify the sender by reply e-mail. Please advise the sender immediately if you or your employer do not consent to e-mail for messages of this kind. Opinions, conclusions and other information in this message represent the opinion of the sender and do not necessarily represent or reflect the views and opinions of Ferring.
**********************************************************************


-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html


Re: may be configuration problem

Posted by Stas Bekman <st...@stason.org>.
Kemin Zhou wrote:
> I am new to mod_perl.  Installed the most recent mod_perl
> passed nearly all the test.
> 
> The most recent Apache
> 
> Web server working fine, CGI working fine.  I have used CGI in the past.
> No problem.
> 
> Now I am switching to mod_perl; with the following configuration in 
> httpd.conf
> 
> PerlModule Apache2
> Alias /perl/  /usr/local/apache2/cgi-bin/
> <Location /perl>
>        #SetHandler modperl
>        SetHandler perl-script
> #       PerlInterScope handler # will not work, copied from Apache 2 book
>        PerlResponseHandler ModPerl::Registry
>        PerlOptions +ParseHeaders
>        Options +ExecCGI
> </Location>
> 
> The only problem is when a simple script
> 
> #!/usr/bin/perl -w
> #test.pl
> print "Content-type: text/html\n\n";
> Print "<html><head>....<./head><body> foo bar </body></html>";
> 
> 
> 
> When requested from the browser, it  displays the source of my code (the 
> literal of the two lines above) not the end result of HTML parsing
> (foo bar).
> This must be due to a silly error on my part.  Can someone give me a 
> starting point?

That means that Apache doesn't know it has to run it. How do you issue your 
request? It should be:

http://example.com/perl/test.pl
                   ^^^^^^
What does get added to logs/access_log when you run this request?

__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:stas@stason.org http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com

-- 
Report problems: http://perl.apache.org/bugs/
Mail list info: http://perl.apache.org/maillist/modperl.html
List etiquette: http://perl.apache.org/maillist/email-etiquette.html