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?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Adam314Commented:
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

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
TintinCommented:
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
10 Tips to Protect Your Business from Ransomware

Did you know that ransomware is the most widespread, destructive malware in the world today? It accounts for 39% of all security breaches, with ransomware gangsters projected to make $11.5B in profits from online extortion by 2019.

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
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Perl

From novice to tech pro — start learning today.