You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by "Billeb, Andrew (ATS, IT)" <An...@thehartford.com> on 2008/02/19 21:49:47 UTC

Problem running Perl scripts with mod_perl from Alias directory

Hello mod_perl Gurus,

I'm not sure if this is a mod_perl issue or just an Apache configuration
issue.  Please redirect me if appropriate.

My Configuration:
Apache/2.2.8 (Win32)
Perl: v5.8.8
mod_perl 2.0
I have also followed all the directions through the Registry Scripts
section at: http://perl.apache.org/docs/2.0/os/win32/config.html

Here's The Problem
I have several Perl scripts and a module in C:/Apache2/cgi-bin/ridhwan/.
Each script has a submit button that will display a new page. All my
scripts work fine when accessed from this type of URL: 

	http://localhost/cgi-bin/ridhwan/script_name.pl 

I would like to use mod_perl to handle these scripts.  So, rather than
set up a new directory on the filesystem, I have put the following in
the httpd.conf file.  Note that it is supposed to remove the /cgi-bin/
part of the path: 
 
Alias /ridhwan/ "C:/Apache2/cgi-bin/ridhwan/" 
<Location /ridhwan> 
   SetHandler perl-script 
   PerlResponseHandler ModPerl::Registry 
   Options +ExecCGI 
   PerlOptions +ParseHeaders 
</Location> 

The result is that when I click on a URL like the following (i.e.
missing the the /cgi-bin/): 

	http://localhost/ridhwan/script_name.pl 

the script displays fine....but clicking the submit button doesn't do
anything....it just redisplays the same page. But it's the *same script*
as in the first link.  It's just being accessed through the alias. So, I
don't understand why it doesn't work.

Any idea what's wrong?

Thanks,
Andrew



*************************************************************************
This communication, including attachments, is
for the exclusive use of addressee and may contain proprietary,
confidential and/or privileged information.  If you are not the intended
recipient, any use, copying, disclosure, dissemination or distribution is
strictly prohibited.  If you are not the intended recipient, please notify
the sender immediately by return e-mail, delete this communication and
destroy all copies.
*************************************************************************


RE: Problem running Perl scripts with mod_perl from Alias directory

Posted by "Billeb, Andrew (ATS, IT)" <An...@thehartford.com>.
Thanks Colin....you're right, my wording wasn't great.  

If I click the submit button, the page just resets to the default page.
(To be more clear.....there is a popup_menu and a submit button.  If I
select a value in the popup_menu, and then click submit, the page just
resets to how it appeared before I even selected the value from the
popup_menu.)

Note: The same script works fine when called from the non-alias path.

Thanks,
Andrew

Andrew Billeb | ATS - Config | 860-547-5983 |
andrew.billeb@thehartford.com

-----Original Message-----
From: Colin Wetherbee [mailto:cww@denterprises.org] 
Sent: Tuesday, February 19, 2008 5:05 PM
To: Billeb, Andrew (ATS, IT)
Cc: modperl@perl.apache.org
Subject: Re: Problem running Perl scripts with mod_perl from Alias
directory

Billeb, Andrew (ATS, IT) wrote:
> The result is that when I click on a URL like the following (i.e. 
> missing the the /cgi-bin/):
> 
> _http://localhost/ridhwan/script_name.pl_
> 
> the script displays fine....but clicking the submit button doesn't do

> anything....it just redisplays the same page. But it's the *same
> script* as in the first link.  It's just being accessed through the 
> alias. So, I don't understand why it doesn't work.

Could you be more specific here?

For example, "doesn't do anything" and "redisplays the same page" are
contradictory statements.  What exactly happens?

Colin


*************************************************************************
This communication, including attachments, is
for the exclusive use of addressee and may contain proprietary,
confidential and/or privileged information.  If you are not the intended
recipient, any use, copying, disclosure, dissemination or distribution is
strictly prohibited.  If you are not the intended recipient, please notify
the sender immediately by return e-mail, delete this communication and
destroy all copies.
*************************************************************************


Re: Problem running Perl scripts with mod_perl from Alias directory

Posted by Colin Wetherbee <cw...@denterprises.org>.
Billeb, Andrew (ATS, IT) wrote:
> The result is that when I click on a URL like the following (i.e. 
> missing the the /cgi-bin/):
> 
> _http://localhost/ridhwan/script_name.pl_
> 
> the script displays fineā€¦.but clicking the submit button doesn't do
>  anything....it just redisplays the same page. But it's the *same
> script* as in the first link.  It's just being accessed through the
> alias. So, I don't understand why it doesn't work.

Could you be more specific here?

For example, "doesn't do anything" and "redisplays the same page" are
contradictory statements.  What exactly happens?

Colin