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.

Perl scripts not working

Discussion in 'General Discussion' started by welo, Sep 21, 2005.

  1. welo

    welo Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    I would never have thought to check this because I never use Perl, but yesterday someone mentioned they couldn't run a Perl script from the cgi-bin. So I threw this script in the cgi-bin for another site and, lo and behold, get a 404 error.

    Any ideas what might be doing this?
     
  2. neo4242002

    neo4242002 Well-Known Member

    Joined:
    Jun 28, 2005
    Messages:
    119
    Likes Received:
    0
    Trophy Points:
    16
    Try this one.. (test.pl)

    if this not working let me know the error code that you are geting on your screen...

    --start--

    #!/usr/bin/perl -w

    # Tell perl to send a html header.
    # So your browser gets the output
    # rather then <stdout>(command line
    # on the server.)
    print "Content-type: text/html\n\n";

    # print your basic html tags.
    # and the content of them.
    print "<html><head><title>Hello World!! </title></head>\n"; print "<body><h1>Hello world</h1></body></html>\n";

    --end--
     
  3. welo

    welo Well-Known Member

    Joined:
    Nov 11, 2002
    Messages:
    71
    Likes Received:
    0
    Trophy Points:
    6
    Okay, sorry about that. I was uploading to the wrong account. Makes me wonder if my client is doing the same thing :). Everything works (both scripts).
     
Loading...

Share This Page