Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??

the precise answer to your question is that hello.pl must be placed in the directory cgi-bin.

No, that's a common configuration, but not universal, on my system this is called "cgi" not "cgi-bin". The precise answer is the one you get after reading the documentation for your webserver.

Typically this will be found in the public_html directory, but is sometimes not so you may have to look around for it

On my system 'public_html' is 'pages', and 'cgi' is a sibling, not a child. You shouldn't have to "look around for it" though, the aforementioned documentation should tell you.

You also may need to change the permissions on the file to 755

Hopefully the system will be set up so that world doesn't need access and you can limit execute permission to the group.

(normally this can be done using you ftp client)

Although hopefully you are using sftp, rsync over ssh, or some other means of transfering files that doesn't result in passwords being sent in clear text.

and if you are viewing from a browser an html header print "Content-type: text/html\n\n"; before your print 'hello world'; statement will probably be necessary.

Would it qualify as a CGI script if it didn't output a Content-type header?

Either way, printing out the content-type directly instead of using a module (such as CGI.pm) probably isn't the way to go.


In reply to Re^2: where to place the .pl fro cgi script by dorward
in thread where to place the .pl fro cgi script by phemal

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • Outside of code tags, you may need to use entities for some characters:
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others having an uproarious good time at the Monastery: (9)
    As of 2014-08-23 12:46 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The best computer themed movie is:











      Results (173 votes), past polls