The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Cant Access Perl Files from Web

Discussion in 'General Discussion' started by rqsweat, Nov 1, 2007.

  1. rqsweat

    rqsweat Active Member

    Joined:
    Mar 25, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    New Jersey
    I cant seem to figure out why none of my PERL files are working when I try to access them in my browser. When I open a .pl file in my browser (or any browser), I get an IE dialogue box which asks me if I want to open or download the file.

    This only happens for .pl files... and it's happening for ALL of the users/websites on my server as well. I've tried doing a Cpanel update, I've tried rebooting, I've tried chmoding the files to 777. Perl Version 5.8.5.

    Any suggestions?
     
  2. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    Permissions wouldn't cause IE to prompt to download the file. Sounds like a mime type issue. On a test server I am using, I see the following mime type:

    application/perl pl plx ppl perl pm

    Do you see that when you click on "Mime Types" on a cPanel account on your server? I am hesitant to simply suggest add the mime type as it could be a sign of other issues. However, if you add it and everything works *shrugs*.

    Additionally, if you are using Perl 5.8.5, you should definitely upgrade to 5.8.8 especially if you're running cPanel 11.
     
  3. rqsweat

    rqsweat Active Member

    Joined:
    Mar 25, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    New Jersey
    Hi Dave... thanks for the suggestion... Yes I check the Mime types and PERL is listed with the afformentioned extensions...

    Any other suggestions? How do I upgrade PERL? I cant do it via the RPM or Cpanel Updates. Is there a script for it?
     
  4. cPanelDavidG

    cPanelDavidG Technical Product Specialist

    Joined:
    Nov 29, 2006
    Messages:
    11,279
    Likes Received:
    8
    Trophy Points:
    38
    Location:
    Houston, TX
    cPanel Access Level:
    Root Administrator
    May also want to place your Perl scripts in cgi-bin to see if that helps.

    As for upgrading Perl, http://forums.cpanel.net/showthread.php?t=66166 contains instructions on how to do that :).
     
  5. rqsweat

    rqsweat Active Member

    Joined:
    Mar 25, 2003
    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    6
    Location:
    New Jersey
    Thanks Dave,

    I followed those instructions and upgraded to perl... still didn't help. But when you said to make sure that my perl files are in my cgi-bin, I remembered that they are not. So I moved one of them to the cgi-bin and it worked. Which made me think..why all of a sudden dont my perl files work when they did months ago.

    I relaized that I removed the following line from my .htaccess:

    Options +ExecCGI
    AddHandler cgi-script cgi pl

    Once I added that back, it resolved the issue. Hope this helps somebody
     
Loading...

Share This Page