Problem running Perl scripts with mod_perl from Alias directory

Problem running Perl scripts with mod_perl from Alias directory

am 19.02.2008 21:49:47 von Andrew.Billeb

This is a multi-part message in MIME format.

------_=_NextPart_001_01C87338.F73D16CB
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable

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:=20

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

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:=20
=20
Alias /ridhwan/ "C:/Apache2/cgi-bin/ridhwan/"=20
=20
SetHandler perl-script=20
PerlResponseHandler ModPerl::Registry=20
Options +ExecCGI=20
PerlOptions +ParseHeaders=20
=20

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

http://localhost/ridhwan/script_name.pl=20

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.
************************************************************ *************


------_=_NextPart_001_01C87338.F73D16CB
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable






Problem running Perl scripts with mod_perl from Alias directory</TIT=<br /> LE><br /> </HEAD><br /> <BODY><br /> <!-- Converted from text/rtf format --><br /> <br /> <P><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">Hello mod_perl Gurus,=<br /> </FONT></SPAN><br /> </P><br /> <br /> <P><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">I'm not sure if this =<br /> is a mod_perl issue or just an Apache configuration issue.  Please red=<br /> irect me if appropriate.</FONT></SPAN><br /> </P><br /> <br /> <P><SPAN LANG=3D"en-us"><B><FONT SIZE=3D2 FACE=3D"Arial">My Configuration:<=<br /> /FONT></B></SPAN><br /> <br /> <BR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">Apache/2.2.8 (Win32)=<br /> </FONT></SPAN><br /> <br /> <BR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">Perl:</FONT> <FONT S=<br /> IZE=3D2 FACE=3D"Arial">v5.8.8</FONT></SPAN><br /> <br /> <BR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">mod_perl 2.0</FONT><=<br /> /SPAN><br /> <br /> <BR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">I have also followed=<br /> all the directions through the Registry Scripts section at: </FONT></SPAN>=<br /> <A HREF=3D"http://perl.apache.org/docs/2.0/os/win32/config.html"><SPAN LANG=<br /> =3D"en-us"><U><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">http://perl.a=<br /> pache.org/docs/2.0/os/win32/config.html</FONT></U></SPAN></A><SPAN LANG=3D"=<br /> en-us"></SPAN></P><br /> <br /> <P><SPAN LANG=3D"en-us"><B><FONT SIZE=3D2 FACE=3D"Arial">Here's The Problem=<br /> </FONT></B></SPAN><br /> <br /> <BR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">I have several Perl =<br /> scripts and a module in C:/Apache2/cgi-bin/ridhwan/. Each script has a subm=<br /> it button that will display a new page. All my scripts work fine when acces=<br /> sed</FONT> <FONT SIZE=3D2 FACE=3D"Arial">from this type of URL</FONT><FONT =<br /> SIZE=3D2 FACE=3D"Arial">: </FONT></SPAN></P><br /> <br /> <P><SPAN LANG=3D"en-us">        </SPAN><=<br /> A HREF=3D"http://localhost/cgi-bin/ridhwan/script_name.pl"><SPAN LANG=3D"en=<br /> -us"><U><FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">http://localhost/cg=<br /> i-bin/ridhwan/script_name.pl</FONT></U></SPAN></A><SPAN LANG=3D"en-us"><FON=<br /> T SIZE=3D2 FACE=3D"Arial"> </FONT></SPAN><br /> </P><br /> <br /> <P><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">I would like to</FONT=<br /> > <FONT SIZE=3D2 FACE=3D"Arial">use mod_perl to handle these scripts. =<br /> So, rather than set up a new directory on the filesystem, I have</FONT> <F=<br /> ONT SIZE=3D2 FACE=3D"Arial">put the following in the httpd.conf file</FONT>=<br /> <FONT SIZE=3D2 FACE=3D"Arial">.  Note that it is supposed to remove th=<br /> e /cgi-bin/ part of the path</FONT><FONT SIZE=3D2 FACE=3D"Arial">: </FONT><=<br /> /SPAN></P><br /> <br /> <P><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial"> </FONT></SPAN><br /> <br /> <BR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">Alias /ridhwan/ &quo=<br /> t;C:/Apache2/cgi-bin/ridhwan/" </FONT></SPAN><br /> <br /> <BR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial"><Location /ridhwa=<br /> n> </FONT></SPAN><br /> <br /> <BR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">   SetHand=<br /> ler perl-script </FONT></SPAN><br /> <br /> <BR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">   PerlRes=<br /> ponseHandler ModPerl::Registry </FONT></SPAN><br /> <br /> <BR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">   Options=<br /> +ExecCGI </FONT></SPAN><br /> <br /> <BR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">   PerlOpt=<br /> ions +ParseHeaders </FONT></SPAN><br /> <br /> <BR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial"></Location> </=<br /> FONT></SPAN><br /> </P><br /> <br /> <P><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">The result is that wh=<br /> en I click on</FONT><FONT SIZE=3D2 FACE=3D"Arial"> a URL like the following=<br /> (i.e. missing the the /cgi-bin/)</FONT><FONT SIZE=3D2 FACE=3D"Arial">: </F=<br /> ONT></SPAN><br /> </P><br /> <br /> <P><SPAN LANG=3D"en-us">        </SPAN><=<br /> A HREF=3D"http://localhost/ridhwan/script_name.pl"><SPAN LANG=3D"en-us"><U>=<br /> <FONT COLOR=3D"#0000FF" SIZE=3D2 FACE=3D"Arial">http://localhost/ridhwan/sc=<br /> ript_name.pl</FONT></U></SPAN></A><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=<br /> =3D"Arial"> </FONT></SPAN><br /> </P><br /> <br /> <P><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">the script displays f=<br /> ine</FONT><FONT SIZE=3D2 FACE=3D"Arial">….</FONT><FONT SIZE=3D2 FACE=<br /> =3D"Arial">but clicking the submit button doesn't do anything....it just re=<br /> displays the same page. But it's the *same script* as in the first link.</F=<br /> ONT><FONT SIZE=3D2 FACE=3D"Arial">  It's just being</FONT> <FONT SIZE=<br /> =3D2 FACE=3D"Arial">accessed through the alias.</FONT> <FONT SIZE=3D2 FACE=<br /> =3D"Arial">So, I don't understand why it doesn't work.</FONT></SPAN></P><br /> <br /> <P><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">Any idea what's wrong=<br /> </FONT><FONT SIZE=3D2 FACE=3D"Arial">?</FONT></SPAN><br /> </P><br /> <br /> <P><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">Thanks,</FONT></SPAN><br /> <br /> <BR><SPAN LANG=3D"en-us"><FONT SIZE=3D2 FACE=3D"Arial">Andrew</FONT></SPAN><br /> </P><br /> <br /> <FONT SIZE=3D3><BR><br /> <BR><br /> ************************************************************ *************<B=<br /> R><br /> This communication, including attachments, is<BR><br /> for the exclusive use of addressee and may contain proprietary,<BR><br /> confidential and/or privileged information. If you are not the intended<BR><br /> recipient, any use, copying, disclosure, dissemination or distribution is<B=<br /> R><br /> strictly prohibited. If you are not the intended recipient, please notify<=<br /> BR><br /> the sender immediately by return e-mail, delete this communication and<BR><br /> destroy all copies.<BR><br /> ************************************************************ *************<B=<br /> R><br /> </FONT><br /> </BODY><br /> </HTML><br /> ------_=_NextPart_001_01C87338.F73D16CB--</p> </article> <article> <h2>Re: Problem running Perl scripts with mod_perl from Alias directory</h2><span>am 19.02.2008 23:04:50 von Colin Wetherbee</span> <p>Billeb, Andrew (ATS, IT) wrote:<br /> > The result is that when I click on a URL like the following (i.e. <br /> > missing the the /cgi-bin/):<br /> > <br /> > _http://localhost/ridhwan/script_name.pl_<br /> > <br /> > the script displays fineĀ….but clicking the submit button doesn't do<br /> > anything....it just redisplays the same page. But it's the *same<br /> > script* as in the first link. It's just being accessed through the<br /> > alias. So, I don't understand why it doesn't work.<br /> <br /> Could you be more specific here?<br /> <br /> For example, "doesn't do anything" and "redisplays the same page" are<br /> contradictory statements. What exactly happens?<br /> <br /> Colin</p> </article> <article> <h2>RE: Problem running Perl scripts with mod_perl from Alias directory</h2><span>am 20.02.2008 13:39:05 von Andrew.Billeb</span> <p>Thanks Colin....you're right, my wording wasn't great. =20<br /> <br /> If I click the submit button, the page just resets to the default page.<br /> (To be more clear.....there is a popup_menu and a submit button. If I<br /> select a value in the popup_menu, and then click submit, the page just<br /> resets to how it appeared before I even selected the value from the<br /> popup_menu.)<br /> <br /> Note: The same script works fine when called from the non-alias path.<br /> <br /> Thanks,<br /> Andrew<br /> <br /> Andrew Billeb | ATS - Config | 860-547-5983 |<br /> andrew.billeb@thehartford.com<br /> <br /> -----Original Message-----<br /> From: Colin Wetherbee [mailto:cww@denterprises.org]=20<br /> Sent: Tuesday, February 19, 2008 5:05 PM<br /> To: Billeb, Andrew (ATS, IT)<br /> Cc: modperl@perl.apache.org<br /> Subject: Re: Problem running Perl scripts with mod_perl from Alias<br /> directory<br /> <br /> Billeb, Andrew (ATS, IT) wrote:<br /> > The result is that when I click on a URL like the following (i.e.=20<br /> > missing the the /cgi-bin/):<br /> >=20<br /> > _http://localhost/ridhwan/script_name.pl_<br /> >=20<br /> > the script displays fine....but clicking the submit button doesn't do<br /> <br /> > anything....it just redisplays the same page. But it's the *same<br /> > script* as in the first link. It's just being accessed through the=20<br /> > alias. So, I don't understand why it doesn't work.<br /> <br /> Could you be more specific here?<br /> <br /> For example, "doesn't do anything" and "redisplays the same page" are<br /> contradictory statements. What exactly happens?<br /> <br /> Colin<br /> <br /> <br /> ************************************************************ *************<br /> This communication, including attachments, is<br /> for the exclusive use of addressee and may contain proprietary,<br /> confidential and/or privileged information. If you are not the intended<br /> recipient, any use, copying, disclosure, dissemination or distribution is<br /> strictly prohibited. If you are not the intended recipient, please notify<br /> the sender immediately by return e-mail, delete this communication and<br /> destroy all copies.<br /> ************************************************************ *************</p> </article> <footer> <a href="/">Index</a> | <a href="/impressum.php">Impressum</a> | <a href="/datenschutz.php">Datenschutz</a> | <a href="https://www.xodox.de/">XODOX</a> </footer> </main> </body> </html>