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.

How to run Perl CGI script

Discussion in 'General Discussion' started by rgaut, Sep 2, 2007.

  1. rgaut

    rgaut Registered

    Joined:
    Sep 2, 2007
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    I just registered with a web service provider that uses cPanel. I cannot get any support from them and i am a newbie so i am looking for answers on this forum. I am trying to run Perl CGI scipts but i keep getting the following error: Internal Server Error 500
    I created the folling script for test purpose:
    #!/usr/bin/perl


    print "Content-type: text/html\n\n";
    print "Show me the monkey";

    The permission for the home directory and scipt file are set to 755
    The extension of the file is .cgi
    An HTML file runs fine
    I tried it as well from the cgi-bin directory without any success
    The server is running on Apache

    Any Ideas ???
     
    #1 rgaut, Sep 2, 2007
    Last edited: Sep 2, 2007
  2. bradandersen

    bradandersen Active Member

    Joined:
    Oct 6, 2003
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Looks like a bug

    I just moved a bunch of users and all of the /cgi-bin scripts are pointing to /usr/local/apache/cgi-bin instead of the actual domain's /cgi-bin directory.

    Brad
     
  3. bradandersen

    bradandersen Active Member

    Joined:
    Oct 6, 2003
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Just confirmed

    The script alias is missing in the /usr/local/apache/conf/httpd.conf file. I will submit a bug to bugzilla.

    Brad
     
  4. bradandersen

    bradandersen Active Member

    Joined:
    Oct 6, 2003
    Messages:
    43
    Likes Received:
    0
    Trophy Points:
    6
    Missing for all domains

    It is missing for all of my domains so none of my current users can do CGI scripting at the moment.

    Brad
     
  5. NexGenUK

    NexGenUK Active Member

    Joined:
    May 7, 2004
    Messages:
    35
    Likes Received:
    0
    Trophy Points:
    6
    The home directory (public_html) should be chmod to 0750 (rwxr-x---) - as long as the .cgi file is chmod with 0755 (rwxr-xr-x) it should work... It shouldnt have to be in the cgi-bin dir for that to work (have tested on 4 different servers).
     
Loading...

Share This Page