Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

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:
    156
    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:
    166
    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:
    156
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice