Perl web form submit gets file download window rather than form execution and display

First, this may not be a purely PERL question.
We recently updated our PERL software on our LAMP (Linux, Apache, MySQL, Perl) system.
Subsequently, a form which had been working great (and the code has not been changed)
Now, instead of executing, when a user clicks on the submit button, it pops up a window asking the user if they want to open the perl program with the PERL command line interpreter.

Any ideas what might need changing to resolve this?

Stumped.

-G
gmanpertAsked:
Who is Participating?
 
Adam314Connect With a Mentor Commented:
This usually means the webserver doesn't know it should be executing the file.
Did your apache httpd.conf change at all?
Do you have the ExecCGI option turned on for the directory the script is in?
Do you have the execute bit set for the webserver user?
0
 
TintinConnect With a Mentor Commented:
Definitely not a Perl problem and absolutely an Apache configuration problem.

Check your Apache CGI configuration.
0
 
gmanpertAuthor Commented:
Here is where I'm at:

> Did your apache httpd.conf change at all?  

  Anything is possible but most likely no.

> Do you have the ExecCGI option turned on for the directory the script is in?

Here are my Apache Settings in my httpd.conf file:

 ScriptAlias /fperl "/www/htdocs/frms/fperl"
  <Directory "/www/htdocs/frms/fperl">
        AllowOverride None
        SetHandler cgi-script
        AddHandler cgi-script .PL .pl
        Options +ExecCGI -Includes
        Order allow,deny
        Allow from all
    </Directory>

<Files "/www/htdocs/frms/fperl/simple.pl">
 AllowOverride None
 Options ExecCGI
 SetHandler cgi-script
</Files>

Here is simple.pl script:

#!/usr/bin/perl -w
print "Content-type: text/html\n\n";
print"<tt>\n";
foreach $key (sort keys(%ENV)) {
 print "$key = $ENV{$key}<p>";
}

Do you have the execute bit set for the webserver user?

 The simple.pl script is owned by wwwrun with group www and is readable and executable by User, Group, and World.

Trying to view http://mydomain/fperl/simple.pl

Still gets me a pop-up window with the text, "Opening simple.pl.  You have chosen to open simple.pl which is a PL file from http://mydomain  What should Firefox do with this file?"

I'm sure I am just missing something obvious, but I'm not sure what.

-G
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

 
gmanpertAuthor Commented:
Also, the simple.pl script works fine on another server... so you can definitely eliminate that as the source of the problem.

Basically, something is not turned on properly for CGI.  Just not sure what?

-g
0
 
gmanpertAuthor Commented:
I should mention that mod_perl is loaded, mod_perl.so is where it should be. So that isn't the problem either.
0
 
gmanpertAuthor Commented:
Finally, resolved this.  Apparently, once we updated Apache and PERL on our servers one needs to use this configuration:

 ScriptAlias /fperl "/www/htdocs/frms/fperl"
  <Directory "/www/htdocs/frms/fperl">
        AllowOverride None
        SetHandler perl-script
        PerlResponseHandler ModPerl::PerlRun
        PerlOptions +ParseHeaders
        Options +ExecCGI
#        AddHandler perl-script .PL .pl
        Order allow,deny
        Allow from all
    </Directory>

Thanks for the insights!

0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.