stu7 has asked for the wisdom of the Perl Monks concerning the following question:

    problem with:  perl scripts / Apache / SuSE 7.+

    I have a working netscape/apache setup which will run 
 a  file.cgi  type script correctly... however, if I copy 
 this to  file.pl  I get a popup widget which offers to 
 save the file, but wont run it.

    I know the script works...(cgi copy works fine)...
 and I'm pretty sure it is something in the httpd.conf 
 file that needs adding or changing... however, none of
 the following have worked:

  adding  .pl  to the AddHandler cgi-script .cgi  line

  adding  AddType application/x* 
    (neither x-perl nor x-httpd-perl worked)

  installing mod_perl for apache 

    Hopefully, somebody here using SuSE 7.+  is running
 perl scripts through their browser, and can help with
 this ?

    Since none of the suggested fixes have worked, this
 may be a bug in SuSE, rather than a config problem...
 if you know of a patch, that would be appreciated too.  

Edit by tye to remove H3 tags around entire post

Replies are listed 'Best First'.
Re: enabling PERL file type in Apache/web
by Gyro (Monk) on Feb 02, 2002 at 17:48 UTC
    I am not as heavy as many of the other monks here reguarding apache or mod_perl. If it works fine as a .cgi it should work fine as a .pl, assuming of course it is a bonified perl. I have worked with both cases. Make sure you have checked everything, however mundane before you blame it on perl, it's not the one configuring the web server.

    Somethings things to consider:

    1. Again make sure your line in httpd.conf is correct: AddHandler cgi-script .cgi .pl
    2. Did you restart your web server after you changed the httpd.conf file?
    3. Make sure your .pl is in cgi-bin
    4. Is the permissions on the file correct?
    I'm sure others could add more and I hope they will.

    Gyro

        Thank you gyro... no, I wasn't really blaming perl... 
      I guess some perl monks dont have a sense of humor :) 
       (note that   :)  <- is a smiley, and not a LABEL :) oops,
      now I'm in an endless smiley loop :)
      
        Even though it is probably the Apache config which is 
      causing the problem, it's necessary to running perl scripts...
      therefore, I assumed a lot of people here would already 
      know specifically what was wrong.
      
        Anyway, thanks for answering... I have tried all those 
      suggestions, and they are all necessary.
      
      
      
        Read the Apache docs and start over with a default httpd.conf and check your permissions and ownerships. And check to see what your platform requires, and check out the Apache mail lists as well.

        Update: As pointed out to me this is off topic. If you are using another product inconjunction with perl check out their docs and news groups. Gyro

Re: enabling PERL file type in Apache/web
by screamingeagle (Curate) on Feb 01, 2002 at 21:56 UTC
    this usually means that the MIME type is not recognised by Apache. you might need to add an additional "AddHandler" directive to the configuration file. Here's the documentation which describes that handler :
    AddHandler
    hth... :)
      no, I tried that... I even said I tried that in my question I guess I should have said that I explicitly added another AddHandler line... no matter, it still doesn't work... and it's all perls fault :)