Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister

Re^2: where to place the .pl fro cgi script

by dorward (Curate)
on Oct 25, 2006 at 09:40 UTC ( #580524=note: print w/replies, xml ) Need Help??

in reply to Re: where to place the .pl fro cgi script
in thread where to place the .pl fro cgi script

the precise answer to your question is that 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 probably isn't the way to go.

  • Comment on Re^2: where to place the .pl fro cgi script

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://580524]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others lurking in the Monastery: (7)
As of 2018-07-22 08:58 GMT
Find Nodes?
    Voting Booth?
    It has been suggested to rename Perl 6 in order to boost its marketing potential. Which name would you prefer?

    Results (453 votes). Check out past polls.